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

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

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. Lou
    Replies:
    3
    Views:
    1,214
    Martin Gregorie
    Jun 27, 2006
  2. Grant Edwards
    Replies:
    6
    Views:
    1,408
    Grant Edwards
    Jun 30, 2004
  3. yakka
    Replies:
    3
    Views:
    8,522
    jc9121
    Aug 17, 2006
  4. Audrey
    Replies:
    3
    Views:
    40,249
    arbat
    Jul 23, 2009
  5. Mitschu
    Replies:
    0
    Views:
    441
    Mitschu
    Nov 21, 2007
Loading...

Share This Page