Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

path and class path settings

 
Chris Buskulic
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just wondering how I would go about setting the path and the claspath on my pc so that I can run the download of JD2SDK.
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, set the "JAVA_HOME" environment variable to the path where you installed the JDK. Mine is set to "C:\j2sdk1.4.2".
Second, add %JAVA_HOME%\bin to your "PATH" variable.
Finally, add "C:\MyJava\classes" [or the appropriate directory] to your CLASSPATH variable. This is the root directory of your packages. If you have more than one root directory, then you can specify multiple paths.
If you have JAR files, you can either put them into "%JAVA_HOME%\jre\lib\ext", where they will be picked up automatically, or you can add them to your classpath.
If you are on Win9x, you set everything up in your "C:\autoexec.bat" file. If you are on WinNT/2K/XP, then they are set using environment variables. I right-click the "My Computer" icon, select "properties" and then go to the "Advanced" tab. From there you should see a "Environment Variables" button that will take you to where you can set everything up. Keep in mind that if you are on Win9x you'll have to re-boot before the settings take affect.
If you are on Unix/Linux, you can do the same thing in your login profile. The main difference is that you use the slash (/) instead of back-slash (\) as the directory separator, and the colon ( instead of the semi-colon ( to separate different paths.
Once you get the hang of everything, you might want to look into using ANT to manage all of you projects.
[ September 23, 2003: Message edited by: Wayne L Johnson ]
 
Chris Buskulic
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I went through and did what I was told and I am still recieving error messages.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris,
It would be really useful if you let us know what error messages you are getting and what you are trying to do (meaning what is your directory where you write code, which code you are trying to compile/run etc..)
What Wayne suggested should have worked.
Regards
Maulin
 
Kristol Crawley
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may have solved this issue already BUT, on every machine I've ever used (with Windows os) I always have to add this to my classpath:
C:\.;
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic