Click to See Complete Forum and Search --> : javax/comm/SerialPortEvent


musiigedeo
July 23rd, 2007, 05:20 AM
Hey guys
when I try to execute my jar file, I do get the error

Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener

It seems that i cannot find the class javax.comm.SerialPortEventListener
but I have in the manifest file included the line "Class-Path: comm.jar". what am I doing wrong guys?

keang
July 24th, 2007, 02:21 PM
To quote from Sun documentation:
Download extensions are specified in the Class-Path header field in the manifest file of an applet, application, or another extension. A Class-Path header might look like this, for example:
Class-Path: servlet.jar infobus.jar acme/beans.jar

With this header, the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as extensions for purposes of the applet or application. The URLs in the Class-Path header are given relative to the URL of the JAR file of the applet or application.So with your manifest file comm.jar would have to be in the same directory as the jar you are running.