views:

121

answers:

2

I've been developing a java application with the eclipse RCP which requires the Java Communications API. Now as the javax.comm has to be setup first (install javax.comm.properties, win32comm.dll and comm.jar) my question ist: How should I deploy my application to make sure javax.comm will be setup on the user's machine? Should I provide an installer which does the setup or should I let the application itself export the files in their respective directories?

I have never before done such a thing, so I'd appreciate any help.

Thanks

A: 

How would you like to distribute your application? As a JAR, I assume? In this case you need to setup the JAR's manifest.mf file with a Class-Path entry which contains semicolonseparated relative paths to the desired resources (relative from the JAR file itself on). You can distribute your application with the javax.comm stuff included and if necessary write a readme.txt with installation instructions.

BalusC
I'm going to distribute it as an eclipse plugin (.jar) within an RCP application (.exe). Adding the files to the manifest.mf didn't work and a manual installation instruction isn't really an option for the kind of users the application is directed to.
+1  A: 

I'm using RXTX instead of Java Comm, but the problem is the same, i think. The RXTX site has a documentation about it, please see the Wiki. The description is for Eclipse 3.3, but works for 3.5 too.

jopa
In the meantime I've switched to RXTX too and I have found a nice [instruction](http://www.kuligowski.pl/java/rs232-in-java-for-windows,1) on how to embed it within an Eclipse Java project.