javax/comm/SerialPortEventListener

Discussion in 'Java' started by Abhishek, Dec 14, 2004.

  1. Abhishek

    Abhishek Guest

    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)
     
    Abhishek, Dec 14, 2004
    #1
    1. Advertisements

  2. 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.

    Abhishek wrote:
    > 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)
     
    Rogier R. Spaans, Dec 14, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,072
    Esmond Pitt
    Mar 27, 2005
  2. lizard
    Replies:
    0
    Views:
    1,967
    lizard
    Jan 30, 2006
  3. Lou
    Replies:
    3
    Views:
    1,369
    Martin Gregorie
    Jun 27, 2006
  4. Grant Edwards
    Replies:
    6
    Views:
    1,672
    Grant Edwards
    Jun 30, 2004
  5. yakka
    Replies:
    3
    Views:
    8,921
    jc9121
    Aug 17, 2006
  6. Audrey
    Replies:
    3
    Views:
    41,002
    arbat
    Jul 23, 2009
  7. Mitschu
    Replies:
    0
    Views:
    522
    Mitschu
    Nov 21, 2007
  8. jojo.hikaru
    Replies:
    0
    Views:
    2,222
    jojo.hikaru
    Jun 25, 2009
Loading...