Question

I know this question has been asked several times around the internet, but I have spent about a week trying to solve this problem with little luck.

I am trying to install JavaCommAPI (an archived Java package to allow communication with rs232) on a remote linux Ubuntu 11.0, 32-bit server in order to deploy a web project which I have developed on a local apache server on my windows PC.

The thing that puzzles me is, I am able to get the .war web project to deploy on a local apache server on a separate 32-bit LinuxMint16 PC by correctly placing the javax.comm.properties, comm.jar, and libSerialParallel.so files in their respective places.

I use System.getProperty("java.library.path"); in order to find the correct library path in order to install correct files.

On my LinuxMint16:

javax.comm.properties -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib

comm.jar -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext

libSerialParallel.so -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386

....works!

On my remote Ubuntu server I did the exact same for its reported library path

(for example: /usr/local/jdk/jdk1.7.0_45/jre/lib/javax.comm.properties ;

/usr/local/jdk/jdk1.7.0_45/jre/lib/ext/comm.jar ;

/usr/local/jdk/jdk1.7.0_45/jre/lib/i386/libSerialParallel.so)

...fails =(

Things of note: I added the needed apache jars and comm.jar to my libraries in Eclipse using the BuildPath wizard (right click on project --> Build Path-->add external jars) which points to local files on my PC which I obviously cannot use for a remote server which I am only accessing through command line. May this is affecting it somehow?

I tried to get error output (System.err) from the Java Console printed to a separate file for my remote server as that feedback was very helpful in getting all the files sorted on my LinuxMint PC.

    PrintStream ps = new PrintStream(pathName);
    System.setOut(ps);
    System.setErr(ps);

Which again, is oddly working beautifully to print the stream to a local .txt file on my LinuxMintPC but not to the one I designate on my remote ubuntu server.

I am really at a wits end here!! Am I mixing and matching appropriate versions of Systems prohibiting things to run smoothly? I am not sure how to proceed from here, if anyone has any insights I would die of happiness. Thanks

No correct solution

OTHER TIPS

I needed to install OPEN JDK7 on my ubuntu, put files in appropriate library paths (as described above) and now it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top