This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classpath confusion" Watch "classpath confusion" New topic
Author

classpath confusion

Louis StDubois
Greenhorn

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
Author
Rancher

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
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
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.
 
 
subject: classpath confusion
 
Similar Threads
Problem compiling
Problem with installing JUnit on Red Hat
Setting up Paths Permanently
JUnit installation problem
lots of compilation error ,somebody help me with this,