Does MATLAB Builder JA 2.0.4 (R2009b) support Java Web Start / JNLP?
2 次查看(过去 30 天)
显示 更早的评论
I compile my MATLAB code with the MATLAB Builder JA 2.0.4 (R2009b). I would like to invoke the generated JAR files from Java Web Start or JNLP.
采纳的回答
MathWorks Support Team
2010-7-20
The ability to invoke a Java library (JAR-file) generated by MATLAB Builder JA 2.0.4 (R2009b) and MATLAB Builder JA 2.1 (R2010a) from JNLP or Java Web Start (JWS) is not available.
To work around this issue, one option is to place the JAR files on a web server, and write a servlet to invoke the Java component remotely.
Another option to try is to follow these steps:
1. Sign all the JAR files to be used to comply with the security restrictions of Java Web Start/JNLP.
2. Define a local policy to accept the certificates used above.
3. In order to run the code deployed using the MATLAB Builder JA toolbox under JWS, you have to put the following statement at the beginning of your Java application before instantiating the MATLAB Compler Runtime (MCR):
MWApplication.initializeApplication(MWMCROption.NOJVM);
This option causes the MCR to not load its own JVM. Without this line, the code will not run properly. This option only works from MATLAB 7.8 (R2009a) onwards.
While these steps have enabled a simple example to be run with JWS/JNLP, some warnings are generated that cannot be removed at the moment.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Java Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!