I Got Error while Run windows JAR Application on CentOs with MCR ? can anyone share Ideas ?

1 view (last 30 days)
I Got Error while Run windows JAR Application on CentOs with MCR ? can anyone share Ideas ?
Error is: XCB plugin Error
My Doubts:
1. Windows or LINUX ,Deploy JAR support (or) fully run without error on same Windows or LINUX.

Accepted Answer

Walter Roberson
Walter Roberson on 6 Jun 2018
The .jar has to have been built with the same operating system family as you execute on. This is also true for .exe and anything else that uses MCR. To be able to execute on Linux, you would need to compile on Linux.
  4 Comments
Selva Karna
Selva Karna on 8 Jun 2018
Edited: Walter Roberson on 8 Jun 2018
Thanks Sir Walter Roberso,
But I got same error like Qt Platform plugin with XCB error, but i have installed QT with XCB also, how solve this Error?

Sign in to comment.

More Answers (1)

Selva Karna
Selva Karna on 9 Jun 2018
Edited: Walter Roberson on 9 Jun 2018
  • MCR Installation with Qt platform:*
Conditions:
1.No need for Qt installation separate
2. MCR have Qt included
Procedure:
java installation in centos 7
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz"
tar xzf jdk-8u171-linux-x64.tar.gz
rpm -qa | grep jdk
yum remove java-1.8.0-openjdk*
cd /opt/jdk1.8.0_171/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_171/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_171/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_171/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_171/bin/jar
alternatives --set javac /opt/jdk1.8.0_171/bin/javac
java -version
export JAVA_HOME=/opt/jdk1.8.0_171
export JRE_HOME=/opt/jdk1.8.0_171/jre
export PATH=$PATH:/opt/jdk1.8.0_171/bin:/opt/jdk1.8.0_171/jre/bin
#move your jar file to java location
rsync -Pavzxl *.jar /opt/jdk1.8.0_171/jre/lib/
rsync -Pavzxl *.jar /opt/jdk1.8.0_171/lib/
Application Testing on End User:
javac -classpath "/usr/local/MATLAB/MATLAB_Runtime/v92/toolbox/javabuilder/jar/javabuilder.jar":./fall.jar ./getmagic.java
java -classpath .:"/usr/local/MATLAB/MATLAB_Runtime/v92/toolbox/javabuilder/jar/javabuilder.jar":./fall.jar getmagic "/root/Desktop/Linux_Test/for_testing/jk.jpg" "/root/Desktop/Linux_Test/for_testing/new.png"

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!