Showing results for 
Search instead for 
Did you mean: 

Matlab Script Server without Java

Hi all,


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,


0 Kudos
Message 1 of 7

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. 



National Instruments

0 Kudos
Message 2 of 7

Hi Danielle,


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 you open a Matlab instance without Java and then call which has a Matlab Script in it that needs to be run with the -nojvm flag. is called by reference in order to avoid a Matlab startup already when is started (which works fine). However, when 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 to the already open -nojvm Matlab or to tell the Matlab Script Node in to open Matlab with the -nojvm flag. Both will work for me.


Hope that the problem is a bit clearer now.




Download All
0 Kudos
Message 3 of 7

Any ideas on how to fix the issue? Any help is highly appreciated!

0 Kudos
Message 4 of 7

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. 



0 Kudos
Message 5 of 7

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.


0 Kudos
Message 6 of 7

Issue is still relevant, it would really surprise me if there is no solution for it.



0 Kudos
Message 7 of 7