This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
First, set the "JAVA_HOME" environment variable to the path where you installed the JDK. Mine is set to "C:\j2sdk1.4.2". Second, add %JAVA_HOME%\bin to your "PATH" variable. Finally, add "C:\MyJava\classes" [or the appropriate directory] to your CLASSPATH variable. This is the root directory of your packages. If you have more than one root directory, then you can specify multiple paths. If you have JAR files, you can either put them into "%JAVA_HOME%\jre\lib\ext", where they will be picked up automatically, or you can add them to your classpath. If you are on Win9x, you set everything up in your "C:\autoexec.bat" file. If you are on WinNT/2K/XP, then they are set using environment variables. I right-click the "My Computer" icon, select "properties" and then go to the "Advanced" tab. From there you should see a "Environment Variables" button that will take you to where you can set everything up. Keep in mind that if you are on Win9x you'll have to re-boot before the settings take affect. If you are on Unix/Linux, you can do the same thing in your login profile. The main difference is that you use the slash (/) instead of back-slash (\) as the directory separator, and the colon ( instead of the semi-colon ( to separate different paths. Once you get the hang of everything, you might want to look into using ANT to manage all of you projects. [ September 23, 2003: Message edited by: Wayne L Johnson ]
Joined: Sep 23, 2003
I went through and did what I was told and I am still recieving error messages.
Hi Chris, It would be really useful if you let us know what error messages you are getting and what you are trying to do (meaning what is your directory where you write code, which code you are trying to compile/run etc..) What Wayne suggested should have worked. Regards Maulin