This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
You always need to set the classpath, for compilation and for running. It's just that if you're compiling a single Java source file, then it doesn't depend on any other classes, and so there is nothing to put in the classpath.
But if you have two source files -let's say A and B, and A uses a B object- then you can't compile A without setting the classpath to include B.
Please see the location of the program you have saved, if the program is inside the bin folder of the jdk then there is no need to setpath for the jdk.... please take a look at it.........
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35440
9
posted
0
The PATH has nothing to do with the CLASSPATH (which the question is about). Plus, keeping user classes or programs in the JRE's bin directory in very bad practice.