Results 1 to 10 of 10
  1. #1
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default javax/comm/SerialPortEvent

    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?

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    I tried to use Java Communicaions API before. The bad news is that most of the installation instructions which basically described which file (dll, jar and a properties file as far as i remember) to copy where, are not working :( But the good news is that i know one of them working. :) But i don't remember which one is that. Try them and let us know the result.

  3. #3
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    I have the following manifest file

    Manifest-Version: 1.0
    Archive-Sealed: true
    Class-Path: comm.jar win32com.dll
    Main-Class: net.java.dev.a_jar_stdio_terminal.StdioTerm

    I have comm.jar in c:\...jre\lib\ext
    win32com.dll in c:\...jre\bin

  4. #4
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    I have tried all the installations i could find on the net. Which advise would you have for me?

  5. #5
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Sorry about hat, i am not using that library currently and i can't test them myself..

    But what about the properties file? As far as i remember there is a properties file comes with java comm. library.

    And you might try to copy the files to JDK relative paths in addition to JRE as you already did.

  6. #6
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    I have the javax.comm.properties file in C:\Programmer\JBuilder\jre\lib and C:\Programmer\JBuilder\jre\jre\lib

  7. #7
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    Quote Originally Posted by JavaBean View Post
    And you might try to copy the files to JDK relative paths in addition to JRE as you already did.
    I have copied comm.jar into
    %JAVA_HOME%\lib
    %JAVA_HOME%\jre\lib\ext

    win32com.dll into
    %JAVA_HOME%\bin
    %JAVA_HOME%\jre\bin
    %windir%System32

    javax.comm.properties into
    %JAVA_HOME%\lib
    %JAVA_HOME%\jre\lib

    I've done the copying according to the java communication API

    But should this affect the functionality of the jar file??
    Last edited by musiigedeo; 07-24-2007 at 05:00 PM.

  8. #8
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    I have found out that when I have the comm.jar file in the same directory as my jar file, then I do not get the error "Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener"

    But when I try to read/write to the serial port, nothing happens... what does wrong?

  9. #9
    musiigedeo is offline Member
    Join Date
    Jul 2007
    Posts
    13
    Rep Power
    0

    Default

    I have solved my problem. I had 2 java versions on my pc

  10. #10
    Senencillo is offline Member
    Join Date
    Nov 2008
    Posts
    1
    Rep Power
    0

    Default I need to Know the solution. Please

    I have the same problem with the comm port. How did you solve this?

    When i run the program in Netbeans in mi computer there is no problem, but when i try to execute jar file from console i get this error:

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

    Thanks

Similar Threads

  1. Replies: 7
    Last Post: 07-12-2010, 04:24 PM
  2. javax.microedition.io/ javax.bluetooth
    By ahtiven in forum New To Java
    Replies: 3
    Last Post: 01-13-2009, 02:54 PM
  3. Comm API Usage
    By hobbyist in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 04:59 PM
  4. javax.comm package for COM ports
    By valery in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 03:03 PM
  5. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 07:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •