Compile the plotdemo example

2 ビュー (過去 30 日間)
Jamee Lin
Jamee Lin 2017 年 4 月 12 日
回答済み: Jordan Vincent 2017 年 6 月 21 日
Hi all,
I am recently working on compiler SDK for JAVA application. There is one example in the manual showing how to display a MATLAB plot in JAVA application with the following steps:
  1. Create the JAVA package to build a JAVA class wrapping around the MATLAB code, which is plot(x,y) in this case
  2. Compile createplot.java
  3. Run the createplot.class
I am fine with the first two steps. In step 3, when I typed:
java -classpath .:/Applications/MATLAB_R2016b.app/toolbox/javabuilder/jar/javabuilder.jar:./plotdemo/distrib/plotdemo.jar createplot
in terminal, it popped out a warning and an error messages:
objc[37033]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java and /Applications/MATLAB_R2016b.app/sys/java/jre/maci64/jre/lib/jli/libjli.dylib. One of the two will be used. Which one is undefined.
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt
System: Mac OS X 10.11.6 El Capitan & JAVA 1.7.0.79
Any possible solutions? Thank you.

回答 (2 件)

Swathik Kurella Janardhan
Swathik Kurella Janardhan 2017 年 4 月 19 日
This issue is related to JDK. According to the link below, installing different JDK can resolve this issue: http://stackoverflow.com/questions/18794573/objc10012-class-javalaunchhelper-is-implemented-in-both-libinstrument-dyl
  1 件のコメント
Jamee Lin
Jamee Lin 2017 年 4 月 20 日
Hi,
Thank you for the answer. Looks like the warning message is benign but what really bugged me is the error message. Not sure if these two are related though.

サインインしてコメントする。


Jordan Vincent
Jordan Vincent 2017 年 6 月 21 日
I am getting the same error on OSX Sierra on JDK 1.8.0_131.

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by