Serial port connection

Hey Guys

I have developed an application in JBuilder which can both read and write to the serial port. This application works perfectly when i run it from JBuilder. I have so made a jar file of this application and when i run the jar file, I can not read or write to the serial port. And I have included the line "Class-Path: comm.jar" in the manifest file. Have anybody encountered this problem before?

Thansk alot

[434 byte] By [musiigea] at [2007-11-27 10:36:11]
# 1

To answer in the same vagueness as your problem description:

Yes, someone has.

CeciNEstPasUnProgrammeura at 2007-7-28 18:39:38 > top of Java-index,Java Essentials,Java Programming...
# 2

Note that putting the JAR in the class-path isn't enough, Javacomm needs a few more installation steps like placing some properties file somewhere. Although what the exact problem is I can't tell you without an error or exception message.

CeciNEstPasUnProgrammeura at 2007-7-28 18:39:38 > top of Java-index,Java Essentials,Java Programming...
# 3

I get this exception when i try to send some thing to the port

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at SimpleRead.writeToport(SimpleRead.java:126)

at ttteer$1.actionPerformed(ttteer.java:137)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.AbstractButton.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown

Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Line 126 in simpleRead is outputStream.write(sent_byte); where sent_byte is the byte to be sent. And line 137 in ttteer calls the method in simpleRead which has line 126

musiigea at 2007-7-28 18:39:38 > top of Java-index,Java Essentials,Java Programming...