| Author |
Java Classpaths On WinXP
|
Natasha Boyd
Greenhorn
Joined: Mar 09, 2003
Posts: 1
|
|
I have Windows XP and I think I am having trouble setting the classpath. Whenever I run a program it says "javac is not recognized as an internal or external command". I know to set a classpath you go to environment variables then I dont know what to type in the system variables section. I have the book Java 2 for dummies and they explain that I should add the bin directory to my systems path and then det a CLASSPATH variable (where I plan to put my "java programs"). But how do I do this?
|
 |
Donald R. Cossitt
buckaroo
Ranch Hand
Joined: Jan 31, 2003
Posts: 401
|
|
What about your path variables? Did you change those as well? For the way I had loaded the SDK I placed this in my path statement: C:\j2sdk1.4.1_02\BIN;C:\j2sdk1.4.1_02\JRE\BIN Hope this helps doco
|
doco
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Natasha, Doco is right. The problem you're having is the system PATH variable is not set to find javac. All the executables for the JAVA SDK are located in the bin subdirectory of wherever the SDK is installed. I'm not sure about XP, but for Win 2000 if you right click MyComputer and select properties, that will bring up the System Properties dialog. You then click the Advanced tab and next the Environment Variables button. Scroll down in the bottom window (System variables) and highlight the PATH variable and click Edit. In the Variable value text window, click at the end of the line and add ;<SDK PATH>/bin. You need to substitue <SDK PATH> for the real path. For example C:\j2sdk1.4.1 Hope this helps, Michael Morris
|
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
|
 |
Derek Grey
Ranch Hand
Joined: Feb 09, 2002
Posts: 204
|
|
hello Natasha, As others have mentioned it's the 'path' (Variables) which is the problem if 'javac' is not being recognized as a command. In XP you'd have to follow this procedure: Click Start - Control Panel - System (Click Classic View incase the new view doesn't show you) - Advanced Tab - Environment Variables Here on the first window (of the 2) click on path and then click on edit. At the end add this C:\jdk\bin Ofcourse 'jdk\bin' could be substituted with your location of the source code. Hope it works. -ST
|
 |
 |
|
|
subject: Java Classpaths On WinXP
|
|
|