aspose file tools*
The moose likes Beginning Java and the fly likes Setting PATH variables in XP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Setting PATH variables in XP" Watch "Setting PATH variables in XP" New topic
Author

Setting PATH variables in XP

Cindy Burkhardt
Greenhorn

Joined: Apr 01, 2004
Posts: 3
I've purchased a new computer since last using Java (Windows XP), and know I need to set the path to be able to get it to compile from the command line. I've installed J2EE, and I've installed TextPad.

I noticed that through the installation process, the following PATH user variable was created: C:\Sun\AppServer\bin

I added the following to the PATH variable: C:\j2sdk1.4.2_04\bin; and created a new CLASSPATH variable that is just "." (a single dot). This was per the instructions on the following link: http://www.cs.ucsb.edu/~teliot/Path_and_Classpath.htm

I restarted the computer and typed java and javac respectively in a command line window. java was recognized, but javac was not.

I also opened TextPad and copy and pasted Hello.java code in, saved it as such, and tried to compile it from within TextPad. It says "The system cannot find the file specified".

So obviously things are not working. Could somebody please help?


Cindy
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

This HOWTO is very bad!
They suggest putting your source-code to the jdk/bin - directory, and the classes too!


http://home.arcor.de/hirnstrom/bewerbung
Gjorgi Var
Ranch Hand

Joined: Feb 24, 2004
Posts: 85
Setting PATH variable in XP:
Start>Control Panel>System properties (arrange in the "old view mode" if necessary to find System properties)>Advanced>Enviroment Variables>User Variable for user(your name) click "new", in "variable name" type PATH, in "variable value" type c:\j2sdk1.4.2_03.bin. Click "Apply" and restart if asked... after that javac and java will work from anywhere.
Give some feedback and good luck,
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11479
    
  16

Also, i've found that if you have a command window open before you add/change any environment variable, it won't pick up the new one. only command windows opened AFTER the change is saved will know about them.
if you restart, obviously that's not a problem.
[ April 02, 2004: Message edited by: fred rosenberger ]

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting PATH variables in XP