Computing.Net > Forums > Programming > How to set java classpath in vista

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to set java classpath in vista

Reply to Message Icon

Name: rayray705
Date: September 13, 2007 at 18:26:04 Pacific
OS: vista
CPU/Ram: 2.8ghz/512mb
Comment:

Hi,

I am having a lot of trouble setting up the jdk classpath in Windows Vista. The following is what I set up:
(copied from the command prompt)
C:\Users\rayray>set classpath
classpath=.;c:\Program Files\Java\jdk1.6.0_02\bin

(copied from the explorer address bar)
C:\Program Files\Java\jdk1.6.0_02\bin

But the javac command is still not working.
What am I doing wrong? Many thanks in advance.



Sponsored Link
Ads by Google

Response Number 1
Name: Guy
Date: September 14, 2007 at 14:09:00 Pacific
Reply:

Not working? Do you mean it is not found?

That directory needs to be in PATH, not CLASSPATH.

You should need nothing in CLASSPATH to run a simple compile.


0

Response Number 2
Name: rayray705
Date: September 14, 2007 at 18:40:08 Pacific
Reply:

This is what I get when I type javac at the command prompt:
'javac' is not recognized as an internal or external command,
operable program or batch file.

Are you saying that I should change the name of the classpath variable to path?


0

Response Number 3
Name: Guy
Date: September 15, 2007 at 08:11:45 Pacific
Reply:

You really want to _add_ it to the existing PATH. Permanently.

Frankly, I know not how you do that in Vista.

In XP, bring up my computer, get into properties, find "environment variables".

One of them will be PATH.

Add that directory to the existing set of directories there, separated by semi-colon.

Can someone else with a Vista box describe this?

Guy



0

Response Number 4
Name: alia
Date: September 28, 2007 at 19:17:55 Pacific
Reply:

Hi to set the the variables in vista:
Control panel(classic view)--> system --> click on "Advanced system settings" in the left tasks, Envirnoment Variables will appear.
Please tell me if it works with u after adding bin to PATH cause I got errors too!
Alia


0

Response Number 5
Name: sha-k
Date: October 9, 2007 at 11:47:04 Pacific
Reply:

Hi
it works pretty well ... i use vista(premium) .... i set the variable for java
Control panel(classic view)--> system --> click on "Advanced system settings" ... select the PATH and >>> Edit >> then add your path to the PATH variable.... normally .. C:\Program Files\Java\jdk1.6.0_(version)\bin .... it's ok on my system

good luck
sha-k


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: How to set java classpath in vista

how to set error control in this? www.computing.net/answers/programming/how-to-set-error-control-in-this/16841.html

how to compile C program in edit pl www.computing.net/answers/programming/how-to-compile-c-program-in-edit-pl/8975.html

How to set priority? www.computing.net/answers/programming/how-to-set-priority/13685.html