You don't have to see the java icon...I don't think I ever see it, yet Java works fine for me. I would suggest using JCreator. It's small and simple. It will be better than notepad but not near as overwhelming as netbeans.
As for the env vars. After setting them, use them in the command line like %somevar%.
As for the error show us the source code for your program, and the command you were using to compile and run the program and we can help