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

2 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2018-6-6
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 个评论
Selva Karna
Selva Karna 2018-6-8
编辑:Walter Roberson 2018-6-8
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?

请先登录,再进行评论。

更多回答(1 个)

Selva Karna
Selva Karna 2018-6-9
编辑:Walter Roberson 2018-6-9
  • 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"

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by