I am trying to run jar for Serial Communication in Ubuntu 14.04 which requires librxtxSerial.so to be in 'jdk/bin' folder. I referred below link:
wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
I tried with both 32-bit/64-bit librxtxSerial.so in 'jdk/bin' but is stuck with both the below error :
OpenJDK Server VM warning: You have loaded library /usr/lib/jni/librxtxSerial-2.2pre1.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1968)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1893)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1883)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at test.Test.main(Test.java:32)
Java Version : 1.7 64-bit
Ubuntu OS Release :
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
When I tried to run it with JAVA 1.8 it gave following error
Error: Could not find or load main clas test.Test (//My jar name is Test)