1

I have Oracle's Java JDK 8 and Tomcat 8 installed on Raspberry PI.

I have a standalone and a web application, both with the same functionaties (open serial communication). Both are running on my macbook.

The problem is: The standalone application runs well on raspbian when I give the CLASSPATH with RXTXcomm.jar, like java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar:. -jar myapp.jar

But the web application doesn't run. I put the war file is Tomcat's webapps directory. When I try to go to http://localhost:8080/myApp/, I get the message:

HTTP Status 500 - javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.CommPortIdentifier

What would cause it?

MCGBra
  • 240
  • 1
  • 5
  • 13

1 Answers1

0

You can try copying a compatible version of RXTXcomm.jar into your tomcat/lib directory. All jars in Tomcat/lib are available on the classpath when running webapps.

  • BTW, since you are developing serial port communications on RasPi, this thread will help: http://stackoverflow.com/questions/12317576/stable-alternative-to-rxtx – GlobalVariable Mar 06 '15 at 19:18