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 confusion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classpath confusion" Watch "classpath confusion" New topic

classpath confusion

Louis StDubois

Joined: Sep 02, 2009
Posts: 4
First, I want to thank all for their patience. I'm not really retardedstupid, just very very green. Second, is their an easy way to test whether I have my path variable right? I think I may have mistakenly set it in both the system and the user section. Third, about the classpath variable:

The Java2 for Dummies says this: "Okay, you've set your PATH variable. Now what? The next thing you do is to tell your system wherre you plan to put your Java programs. To do this, you set something called a CLASSPATH variable."

"The good news is, after you've followed the instructions to set the PATH variable (earlier in this section), then setting the CLASSPATH is the same story all over again. In fact, it's even easier, because you don't have to know the name of any directories. Just follow the steps described above for setting a variable on your particular operating system. When you get to the point where you're actually filling in a value for the CLASSPATH, make sure the value contains a single dot (that's right, a period). C:\jdk\classes;."

Is that really all there is to it?

For those of you who think me too lazy to use the FAQ. I've spent countless hours wandering around in there and often times come out of it even more confused and disillusioned.

Thanks to all for their help and more importantly their patience.

Edited to highlight poor choice of words.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Testing path: type "java -version". Is it the one you expected?

Setting CLASSPATH: it depends on if that's all you need to have on your classpath--there's no way for us to answer that without further information.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45359
On the more recent versions of Java, there is usually no need to have a system classpath at all. Any advice given to set a system classpath is rather out of date, but at least Barry Burd only tells you to add .; which can never do any harm.
I agree. Here's the link:
subject: classpath confusion
jQuery in Action, 3rd edition