• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

how to set classpath

 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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










 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 76415
365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do not set your CLASSPATH at all.
 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
deleted
 
Campbell Ritchie
Marshal
Posts: 76415
365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 76415
365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic