javac -cp ./jcomm/comm.jar Tester.java可以编译,但是运行
java -cp ./jcomm/comm.jar Tester就报如下错误,Tester运行需要comm.jar
[code="java"]Exception in thread "main" java.lang.NoClassDefFoundError: Tester
Caused by: java.lang.ClassNotFoundException: Tester
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Tester. Program will exit.[/code]
怎样在运行时包含comm.jar?