tags:

views:

238

answers:

2

Hi,

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.initializeApplication()?

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.

A: 

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 ;-)

Omar Al Kababji
+5  A: 

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.

Yair Altman