On Windows, a semicolon separates multiple directories. On unix, its a colon.
. means "this directory" (.. means "this directory's parent")
.;C:\Program Files\Java\jdk1.6.0_03\bin means "this directory and C:\Pro..._03\bin"
If you remove the "." from the list, it will stop looking for class files in your current directory.
If you did not enclose it in quotes, your problem was probably caused by it splitting at the first space and making your classpath ".;C:\Program", in which C:\Program does not exist.
Your "CLASSPATH" should always contain . (for any project in which you are working on more than 1 java file). Your "CLASSPATH" should not contain "C:\Program Files\Java\jdk1.6.0_03\bin" but if you add it to your "PATH", then you can just type
rather than having to type
Code:
C:\Program Files\Java\jdk1.6.0_03\bin\java.exe foo
every time. (the .exe is optional on Windows)
PATH is where your operating system looks for executable files (.exe on Windows). CLASSPATH is just a Java environment variable and is just where
Java looks for class files. CLASSPATH can contain directories (that contain class files) or JARs. PATH will usually be used to point to common directories that hold exes, dlls, etc. For example, C:\Windows\System32 is probably where you have ipconfig.exe, and is why you can just type "ipconfig" to use it, rather than having to type "C:\Windows\System32\ipconfig(.exe)"
So, if your current PATH is "foo" then you should make it "foo;C:\Program Files\Java\jdk1.6.0_03\bin"
and your CLASSPATH should be "." unless you need specific other directories or JARs. Usually you just modify your global CLASSPATH if you want to do something like install the mysql driver jar into one directory on your computer and then give every java application on the entire machine access to it. Otherwise, you would just put the jar file with the rest of your files and run with something like
Code:
java -classpath ".;mysql.jar" foo
In this example, the quote marks are not necessary. If the jar file were called "my sql.jar" then you would use ".;my sql.jar" so that it didn't just look for "." and a directory called "my".