Does MATLAB Builder JA 2.0.4 (R2009b) support Java Web Start / JNLP?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
Respuesta aceptada
MathWorks Support Team
el 20 de Jul. de 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.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Java Package Integration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!