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?