java run correctly in the upper directory
I compile By javac some java sources with this sintax:
javac -cp .;c:\com MenuExample.java
this source code are in the directory C:\com\a1\
the compiler makes 2 classes: MenuExample.class and MenuExample$1.class
now if I run it, in the same directory, with
java -cp .;c:\com MenuExample
there is a error messagge:
java.lang.NoClassDefFoundError: MenuExample (wrong name)
if I go to the upper directory (C:\com) and I entry
java a1.MenuExample the program run normally.
I not understand the reason of this behavior.
Thanks in advance