-classpath problem

I got an annoying problem with -classpath problem. Assume that I don't set additional .jar/dir. in CLASSPATH env. var (I like working with shell script):

publicclass Testing{

publicstaticvoid main (String []argv){

System.out.println("abcde");

}

}

I compile the code, and I run the class using c:\jdk1.3.1\bin\java Testing

, then everything is just fine.

But when I changed the code like this:

import myPackage.*;

publicclass Testing{/* same goes here */}

,

I compile the code (works fine), and I run the class using

c:\jdk1.3.1\bin\java -classpath c:\someDir\myPackage.jar Testing

, I got the following error:

java.lang.NoClassDefFoundError: Testing

Exception in thread"main"

Is there something I miss? 'cause it works fine with jdk1.1.*...

[1388 byte] By [verdi96] at [2007-9-26 1:37:47]
# 1
You must include the "current directory" in the classpath:c:\jdk1.3.1\bin\java -classpath c:\someDir\myPackage.jar;. Testing (Note the "." directory added at the end of the classpath.)
DanielBakkelund at 2007-6-29 2:24:58 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
Assuming the myPackage.jar file was created correctly, try:c:\jdk1.3.1\bin\java -classpath c:\someDir\myPackage.jar myPackage.TestingAndrew
alee1010 at 2007-6-29 2:24:58 > top of Java-index,Archived Forums,New To Java Technology Archive...