File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Setting a path and class path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Setting a path and class path" Watch "Setting a path and class path" New topic

Setting a path and class path

dhanashree ghaskadbi

Joined: Apr 26, 2001
Posts: 6
Pease help me with this
How do I set classpath c:\jdk1.2\LIB;.c:\Java
Also, how do I set
path c:\JDK1.2\BIN; C:\JDK1.2\JRE\BIN
Divya Jhawar

Joined: Mar 27, 2001
Posts: 5
Go to Start>Settings>Control Panel>System
Look for Environment variables/Path there.....
Type in what u want....don't forget to end every stmt with a ";"
Click on "set" and then "ok"....
Hope this helps.
Johannes de Jong

Joined: Jan 27, 2001
Posts: 5089
You can either enter the values at the dos prompt or you can add them to your autoexec.bat file.
set classpath c:\jdk1.2\lib;c:\Java;
set path c:\jdk1.2\bin;C:\jdk1.2\jre\bin
if you want to see what youre current settings are, simply type in set with nothing else at the DOS prompt.
The above off course assumes that you use WinTel
Good Luck

Pse note in you lines you had spaces between the different directories. I know that in the old days when we only had DOS, DOS did not like the spaces there. I assume Windows still does not want them there.

[This message has been edited by Johannes de Jong (edited April 27, 2001).]
Don Smathers
Ranch Hand

Joined: Mar 04, 2001
Posts: 31
What has worked well for me ---
1> get a copy of TextPad, cause it will do a lot of the work for you, and is a first-rate resource.
2> put all your classes in c:\jdk1.3\jre\classes, and the javac will automatically look there for you.
3> you can put subdirectories into the classes folder, and reference them as follows : [javac will direct itself to the classes folder, so you don't need a full pathname]
import <subfolder>.<sub2folder>. etc . <yourclass.class>
Hope this helps.
Johannes de Jong

Joined: Jan 27, 2001
Posts: 5089
Youre right Don TextPad spoiles one by doing a lot for you behind the scenes. Great editor
I agree. Here's the link:
subject: Setting a path and class path
It's not a secret anymore!