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 basic classpath theory 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 » Java » Beginning Java
Bookmark "basic classpath theory" Watch "basic classpath theory" New topic

basic classpath theory

jimbo jawgar

Joined: Oct 25, 2004
Posts: 4
Can someone give me a concise statement of classpath theory, plus answer the following


In windows XP there are user variables and systems variables, should/may both contain Classpath? If both, should they be identical?

What is the affect of a preliminary dot & semo-colon ie .; ?

I am doing a course/assignment running java web server 1.0.1. For this purpose I have (user) classpath set

.;C:\DATA\JFW\Java SDK\lib\tools.jar;C:\jswdk1_0_1-win\jswdk-1.0.1\lib\servlet.jar;C:\jswdk1_0_1-win\jswdk-1.0.1\lib\jspengine.jar

Should I have additional directories?
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

The questions posed sound like homework questions, so no direct answers, please.....

As far as basic CLASSPATH theory, see How to Set the Classpath

Whether the USER and SYSTEM classpaths can be duplicated and/or should be identical, try experimenting. Set the values, drop down to a command prompt, and type "SET CLASSPATH" Note that you will have to open a new command prompt every time you change the environment settings.

The '.;' question is far simpler -- in Windows (and Unix/Linux), what does the '.' mean? (It's the name of a directory). Try going to a Command prompt and typing "cd ." Compare that to the results of a "cd .." Take a look at your classpath provided and determine what the semi-colon does -- it seems to separate things, no?

Insofar as to whether you should have additional directories in your classpath, that depends on what classes you want to have accessible. Consult the documentation for the web server that youare trying to install for further details (although a webserver is likely to set up its own classpath and ignore the system's...use the configuration files on the web server to change that classpath.)
[ November 07, 2004: Message edited by: Joel McNary ]

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I agree. Here's the link:
subject: basic classpath theory
It's not a secret anymore!