开发者

What does the JVM in MATLAB Compiler Runtime (MCR) do?

I would like to find out what is the purpose of the JVM (Java Virtual Machine) in the MCR and what is the effect if I invoke the -NOJVM flag in MWApplication.initializeAp开发者_如何学Cplication()?

As I have written an Java application which contain an GUI, and I tried with/without -NOJVM option. And only the LookandFeel of the GUI change.


Matlab contains an internal JVM, which is used for all Matlab-generated GUI (figures, dialog windows, the desktop/editor etc.). By starting Matlab with the -NOJVM switch, you're basically using Matlab as a pure computational engine (the engine is c/c++-based and does not use the JVM). If all your GUI is handled externally to Matlab, then perhaps you don't need the internal JVM, which carries a memory and startup-performance cost.


I am just guessing since I really don't know Matlab, but maybe its just a flag to Matlab to instruct him to use its internal JVM or use the operating system JVM.

For example in the Matlab directory under "C:\windows\program files" you may find a directory containing the JRE of Java and this is the one used by default, however if you use the -NOJVM flag it will ignore its internal JRE and go find the default JRE of the system which is usually the which the environment variable JAVA_HOME points to.

Its just a guess and nothing else ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜