Determine if Matlab runtime is set (preferably using Java)

I have a Java application that at some point calls Matlab executable . For now, I’ll just ask the user to set the included runtime manually, but I would like to avoid it.

What I'm looking for is a way to determine which version of the Matlab runtime (if any) is installed, and if the required version is not installed. I will ask the user to run the installer.

How to check matlab runtime (preferably using Java)?

+1
source share
1 answer

I think you are talking about running compiled Matlab code, right?

For the latest releases of Matlab Runtime, you can look in the registry for the following key:

 HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Runtime\9.0 

Depending on the execution time, the path may change, for example, for version 8.2:

 HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Compiler Runtime\8.2 

Take a look at HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks and adapt to your version.

NB1: the old version of the runtime has no registry entry (for example, version 7.4 (R2006a) has no entry.

NB2: pay attention to virtualization of the path to "Wow6432Node" if it works in x32 mode on the x64 machine (the virutalization path is usually processed by the system, so this should not be a problem).

+2
source

Source: https://habr.com/ru/post/1242539/


All Articles