File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes CLASSPATH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "CLASSPATH" Watch "CLASSPATH" New topic


ahsan naqvi

Joined: May 08, 2002
Posts: 2
Please tell me how to setup class path.
thank you
Sayed Ibrahim Hashimi
Ranch Hand

Joined: May 17, 2001
Posts: 148
You can do it when you are trying to compile programs like:
java -classpath C:\java
Where C:\ is the location of the files. If you are using a package then you want to set the classpath as one directory above the package directory.
Or you can setup your envrionment variable through your OS, just search the sun website for more directions.
[ May 09, 2002: Message edited by: Ibrahim Hashimi ]

SCJP 1.4<br /><a href="" target="_blank" rel="nofollow"></a>
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Check out this thread for more info about setting your classpath in different O/S environments.
hope that helps!

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
As a general tip, lots of great information can by searching past conversations here at JavaRanch. The search page link is at the top right of this page.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Elouise Kivineva
Ranch Hand

Joined: Feb 07, 2002
Posts: 154
The Teach Yourself Java in (* many days/hours whatever) books have an online site with an online tutorial about setting up the jdk on a windows system. The classpath page of this tutorial is
I agree. Here's the link:
subject: CLASSPATH
It's not a secret anymore!