javax/comm/SerialPortEventListener

A

Abhishek

When i try to run a file using comm package it is giving me an error.
please can any body tell me how to resolve this one

C:\Progra~1\Java\j2sdk1.5.0\bin\java neW -classpath "C:\comm.jar"


Exception in thread "main" java.lang.NoClassDefFoundError:
javax/comm/SerialPortEventListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:604)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access+100(URLClassLoader.java:56)
at java.net.URLClassLoader+1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
 
R

Rogier R. Spaans

If neW is the class containing the mainn method you are trying to run
you should use 'java -cp c:/comm.jar neW'. In your example you passed
-classpath and comm.jar as arguments to your app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top