Well, I have a lot of experience using NetBeans, but I'm trying to compile/run a program on a computer without the NetBeans IDE, and I'm having problems:
Note: to make things easy, I saved the file in question to the Desktop. Also, I have updated the PATH variable to the loaction of the folder containing the javac compiler (C:\Program Files\Java\jdk1.5.0_07\bin).
In the command line window, when I get to the Desktop directory, and type:
I get the following error:
Any thoughts? Might there be a problem with my path? Is there a problem with the JRE/JVM?
A long time ago, the JVM tools used the CLASSPATH to find the core classes; perhaps Microsoft's VM always worked this way. But modern JVMs -- certainly JDK 1.5! -- don't; they have their own way of locating the core classes, which are located in (JDK)/jre/lib/rt.jar .
So all I can say is that your JDK installation seems to be broken, and this file is either missing or corrupt. Is that file on your system? If you try to list its contents with the jar.exe command, does it work? I.e.,
jar tf "C:\Program Files\Java\jdk1.5.0_07\jre\lib\rt.jar"
ought to produce a very long listing of all the classes in the Java API; does it?