Simple answer required

I have had troubles with getting messages such as:

C:\Java>java Temperature

Exception in thread"main" java.lang.NoClassDefFoundError: Temperature

I have found that using the following code I can type in java Temperature

C:\Java>set classpath=%classpath%;.;

The only other way I have found to run my programs is to use the code:

C:\Java>java -cp . Temperature

My question is do I have to use the "set classpath" or the " -cp . " everytime I open the command prompt?

Please help

Thank you

Jonathan.

[598 byte] By [jonbida] at [2007-10-2 2:49:53]
# 1
You appear to have set a permanent classpath variable that doesn't include the current directory, which is represented by the period.If so, then just add the period to the existing classpath list - I suggest at the front. Then the "current directory" will always be on the
ChuckBinga at 2007-7-15 21:12:18 > top of Java-index,Developer Tools,Java Compiler...
# 2
Thank you so muchsorry for the simple question, but it has been bugging me, as I do not yet understand the relevance of the -cp . and why I had to use it.Thank you againJonathan
jonbida at 2007-7-15 21:12:18 > top of Java-index,Developer Tools,Java Compiler...