• Post Reply Bookmark Topic Watch Topic
  • New Topic

CLASSPATH and javac  RSS feed

 
Juan Handal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've got a problem and would very appreciated for help.


I have installed Java 5 in the directory:

C:\Program Files\Java\jdk1.5.0_06

My CLASSPATH is:

C:\Program Files\Java\jdk1.5.0_06\bin;

I am in Windows XP,I am able to run 'java' from any directory in
C:\ any subdirectory!.

But 'javac' only run from C:\Program Files\Java\jdk1.5.0_06\bin

in other words only from inside bin directory.

What changes I need to do to my CLASSPATH to run 'javac'

from any directory?

I am working with javac -classpath anad javac -d options,that

is why I need the right CLASSPATH.

Thank you .

 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to put that directory in your PATH, not your CLASSPATH
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Keith Lynn:
You want to put that directory in your PATH, not your CLASSPATH

Definitely! Add this to your PATH, but leave the CLASSPATH alone (at least for now).

For details on setting the PATH, see this step of Sun's installation instructions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!