Hi Desirae.
You're actually using the command PATH on the command line before javac? AS in
C:\Users\Dwayne\java>
PATH javac HelloWorldApp.java
??
This is incorrect. The executable file 'javac.exe' that exists within your JDK installation directory needs to be found within the PATH setting on your machine (to recall it easily that is). It works like this: 'javac.exe', if you installed the JDK to the default directory, should be in
C:\Program Files\Java\jdk_VERSION\bin.
You should use Windows Explorer to verify this. If that's the case, then the command line has no idea how to find the command "javac" to execute and compile the .java source code file into bytecode. Same thing for the '
java', 'jar' and 'javadoc' commands. The PATH environment variable needs to be altered to include that 'bin' directory so the command line can find it. Otherwise you have to do something like this:
C:\Program Files\Java\jdk_VERSION\bin\javac.exe HelloWorld.java
Do a quick search on Google for "Windows Vista environment variables (PATH|CLASSPATH)". While you're at it, set an environmental variable JAVA_HOME to match your JDK installation directory (the aforementioned "C:\Program Files\Java\jdk_VERSION"
With the CLASSPATH, it should at least be set to '.' (the dot indicates the current working directory). So something like this should be returned when you request the %CLASSPATH% variable:
CLASSPATH=. Just FYI, when I perform the install on my Win machines, I always install to C:\Java\jdk_VERSION, it just makes things easier in the long run. Then I install all Java related applications or libraries to a subdirectory under C:\Java and everything is in an easy to find place. Another good tip (if you're using JDK v6 as you should be) is to create a C:\Java\JAR directory and add that to your CLASSPATH as well, using C:\Java\JAR\* as a wildcard to any .jar file you store there.
[ November 09, 2008: Message edited by: Brian Lang ]