SDK1.3.1..."main" java.lang.NoClassDefFoundError: ExampleProgram...again

I've read a view posts regarding this problem but none with SDK1.3.1 or with this type of twist.

I'm having a problem executing the ExampleProgram using:

javac ExampleProgram.java

java ExampleProgram

...and I get...

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

However, if I use oldjava.exe (which I found in the bin folder with a couple other old*.exe files) the program works fine!!

Any ideas?

[482 byte] By [rbiresch] at [2007-9-26 3:54:01]
# 1

Seems to be a CLASSPATH problem. Try:

java -cp . ExampleProgram

It should help. (Beware there are three arguments, the . is the second.)

Maybe you have a classpath variable set where the path doesn't contain the working directory (the "."). You may then consider adding it to the end.

Hope it helps

Ivan

ivanhu at 2007-6-29 12:42:47 > top of Java-index,Developer Tools,Java Compiler...