I am using LabVIEW with a Matlab toolbox that requires Matlab running without java, i.e. if I want to use the toolbox in a standalone Matlab I have to call it from the command line by executing 'Matlab.exe -nojvm'. When using the toolbox from a Matlab Script in LabVIEW, However, I wasn't able to find a way to run the automatically opened Matlab Script Server with the -nojvm flag. I also tried to execute a system call from LabVIEW that opens a Matlab Script Server without JVM which works actually fine, however, LabVIEW starts its own parallel Matlab Server which again doesn't work with the toolbox...
Has anyone experience in opening a Matlab Script Server with an additional (-nojvm) flag or how to make LabVIEW use an already open Matlab Script Server?
Thanks in advance,
Would it be possible to attach the LabVIEW code that executes the script server without JVM? It might be helpful for people to see what you have so far.
thanks for your response and sorry for my late reply. Attached please find a minimal example of what I (actually don't) need. If you run callMain.vi you open a Matlab instance without Java and then call Main.vi which has a Matlab Script in it that needs to be run with the -nojvm flag. Main.vi is called by reference in order to avoid a Matlab startup already when callMain.vi is started (which works fine). However, when Main.vi finally is called it opens another Matlab without the -nojvm flag (i.e. two Matlab command windows are open).
Thus, what I need is either to connect Main.vi to the already open -nojvm Matlab or to tell the Matlab Script Node in Main.vi to open Matlab with the -nojvm flag. Both will work for me.
Hope that the problem is a bit clearer now.
What Matlab toolbox are you using? Is there any documentation on this?
You might want to see if there is a Matlab forum to post this question on. There may be Matlab users that are also familiar with LabVIEW.
I am using Psychtoolbox which in general works fine except when I want to use one specific function (presenting Movie stimuli using GStreamer). The documentation to this says 'use Matlab without java'. And all this works fine when I use a standalone -nojvm Matlab instance. Thus, the issue can not be solved from Matlab/Psychtoolbox.
Again, I am actually able to execute a system call in Labview to open Matlab without java. When I run the Psychtoolbox function within this Command Window line by line typed by hand everything works fine, however, I am not able to tell another VI to use this specific Matlab script server but it will always open another Matlab Script Server which, unfortunately, has Java activated.