Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set classpath

 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i have just installed java ( jdk 6u12-windows-i586-p and jre 6u12-windows-i586-p)
i have installed in d:\program files\java\jdk1.6.0_12

now i set the classpath as .;D:\Program Files\Java\jdk1.6.0_12\bin; in system variables
there is also JAVA_PATH in system variables which is D:\Program Files\Java\jdk1.6.0_12\jre

i set the above 2 variables

the following is by default
QTJAVA which has value D:\lib\ext\QTJava.zip

in the user variables i have
JAVA_HOME D:\Program Files\Java\jdk1.6.0_12\bin;
PATH 3;D:\Program Files\Java\jdk1.6.0_12\bin;D:\Program Files\Java\jdk1.6.0_12\jre;

now when i run path java paths is not coming
is there anyother way to check and is the settings right??

i'm using windows 7 evaluation copy build 7100(RC)

thanks in advance










 
chen rui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do not use " " (space)

JAVA_HOME=your installation directory
path=%JAVA_HOME%\bin;%path%
classpath:directory which you want to run classes

it's OK
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do not set your CLASSPATH at all.
 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

it did not work

when i enter path or javac java path is not coming and javac is not recognised command

thanks in advance
 
chen rui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deleted
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nonsense.

And don't e-mail people

You have no need to set a classpath in the first place. Leave your Java installation in place. Read the installation instructions, particularly no 4 about setting your PATH. Do what it says to "set permanently." An incorrect path is characteristically recognised by a "javac is not recognized" error message. Find the Java™ Tutorials, and there is a "common problems" page in there.
 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi campbell,

it worked...
i removed the classpath as you suggested.....

now when i give path in command prompt it shows,
;D:\Program Files\Java\jdk1.6.0_12\bin;D:\Program Files\Java\jdk1.6.0_12\jre;
is this fine..

now i run the javac command, when i run it shows the list of options....


thank you very much..
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome

If you go through the first part of the Java™ Tutorials you will find a "common problems" page, with a link to how to set the PATH permanently. You will probably do well to set your PATH permanently.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic