Skip to main content

Compiling JT Harness - java comm problems

4 replies [Last post]
bkurotsu
Offline
Joined: 2004-12-13
Points: 0

It has come to our attention that the Java Comm (serial communications) software in our build instructions has disappeared - specifically the binary isn't available for download anymore.

Until we resolve it, we wanted you to know that you can use RXTX (http://users.frii.com/jarvi/rxtx/). The 2.0 version is compatible with our repository. The 2.1 version will work too, but requires altering the some import statements to use the gnu.io.* package.

Note that most users do not need the agent classes that require the serial library. You could use the provided binaries and do not need any serial libraries because you won't initialize those agent libraries. To compile though, you do need to either provide the library or workaround otherwise.

Please pay attention to the license terms of RXTX if you decide to use it.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anuj_mehta
Offline
Joined: 2008-05-22
Points: 0

I am trying to communicate with agent via serial port. I started just the AgentFrame with following command

[i]java -cp javatest.jar com.sun.javatest.agent.AgentFrame -serialPort COM1[/i]

where COM1 is the only serial port available on my system. The AgentFrame opens up and the "[i]serial port[/i]" is selected as mode but in "[i]port[/i]" drop down list I get message "[i]no serial port found or accessible[/i]"

On debugging I observed that in [i]SerialPortModeOptions.java[/i] class the [i]ProxyImpl[/i] class is not getting loaded and "c" is set as null in following line and I am getting "[i]javax/comm/NoSuchPortException[/i]"

[i]Class c = Class.forName(Proxy.class.getName() + "Impl");[/i]

Comments at the top of ProxyImpl says "Expect possible loading errors when accessing this interface, if the gnu.io API is not available.". Currently I am using comm.jar.

[b]My question is that is it fine to use "comm.jar" or should I use RXTX[/b]? In RXTX I downloaded the binary (expecting a jar file and probably a dll file) but it is some other binary format, also the source code zip is in wrong format hence unable to zip.

I also tried to check if my COM1 port is used by any application (used method isCurrentlyOwned() of CommPortIdentifier) but the port is not used by anyone.

anuj_mehta
Offline
Joined: 2008-05-22
Points: 0

Got it....stupid me...I just renamed the RXTX binary to jar and it worked for me

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

Listed as JT Harness Issue #59.

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

UPDATE! The binary from Sun is back.

http://java.sun.com/products/javacomm/