Hi all,
I have simple package "com.testing" contains only one class (Employee.java).
Next I have program which import com.testing.*; (TryPkg.java).
Directory structure is as follow:
C:\Javastuff\com\testing\Employee.java
C:\Javastuff\TryPkg.java
I can compile *and* run this program :
C:\Javastuff>javac -classpath "C:\Javastuff" TryPkg.java
C:\Javastuff>
java -classpath "C:\Javastuff" TryPkg
But WHY when i move TryPkg.java to C:\ it *compiled*, but not execute?
It seems there's a different classpath search for compiler and JVM?
C:\>java -classpath "C:\Javastuff" TryPkg
Exception in
thread "main" java.lang.NoClassDefFoundError: TryPkg
TIA.