Does MATLAB Builder JA 2.0.4 (R2009b) support Java Web Start / JNLP?

2 views (last 30 days)
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 20 Jul 2010
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.

More Answers (0)

Categories

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

Tags

Products


Release

R2009b

Community Treasure Hunt

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

Start Hunting!