Take the 2-minute tour ×


Is there anywhere else I can move javax.comm.properties to other than %JAVA_HOME%/lib?

According to the Java COM API FAQ:

Q: My application does not find any ports when it enumerates available ports.
A: In order for the Java communications API to find ports the file javax.comm.properties must be in the correct place. The preferred location is in /lib. See the installation instructions for alternate locations and further information.

Where can I find the Sun installation instructions that contain these alternate locations?

share|improve this question
add comment

1 Answer

Base on things that a guy said over here: https://forums.oracle.com/forums/thread.jspa?threadID=1316406

You can put the file javax.comm.properties where you have laid comm.jar. But then to run the program, you should specify the path which points to comm.jar like this:

java -cp <your.class.path>;<path.to>/comm.jar YourProgramThatUsesComm.jar

Hope it helps!

share|improve this answer
When I try that I get a NoClassDefFoundError for javax/comm/NoSuchPortException. The only way I can get the program to run, but with no COM ports showing up, is by putting the comm.jar inside MyProgram.jar –  mjh2007 May 30 '12 at 20:41
add comment

Your Answer


