确定是否安装了matlab运行时(最好使用Java) [英] Determine if matlab runtime is installed(preferably using Java)

查看:424
本文介绍了确定是否安装了matlab运行时(最好使用Java)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java应用程序,有时会在Matlab executable上调用.现在,我只是告诉用户手动安装包含的运行时,但是我想避免这样做.

I have a Java application that at some point calls on a Matlab executable. For now I just tell the user to install the included runtime manually but I would like to avoid it.

我正在寻找一种确定已安装哪个版本的Matlab运行时(如果有)的方法,如果未安装所需的版本,我会提示用户选择运行安装程序.

What I'm looking for is a way of determining what version of Matlab runtime(if any) is installed and in case the required version is not installed I'll prompt the user with an option of running the installer.

如何检查Matlab运行时(最好使用Java)?

推荐答案

我认为您是在谈论运行已编译的matlab代码,对吧?

I think you're talking about running compiled matlab code, right ?

对于最新的Matlab Runtime版本,您可以在注册表中查找以下项:

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

HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Runtime\9.0

取决于运行时,路径可能会更改,例如对于版本8.2,它是:

Depending on runtime the path may change, for instance for version 8.2 it is:

HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB Compiler Runtime\8.2

查看HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks并适应您所拥有的版本.

Look into HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks and adapt to the version you have.

NB1:运行时的旧版本在注册表中没有条目(例如,版本7.4(R2006a)没有条目.

NB1: Old version of the runtime do not have entry in the registry (for instance version 7.4 (R2006a) doesn't have entry.

NB2:如果在x64机器上以x32模式运行,则要谨慎地将路径虚拟化到"Wow6432Node"(路径虚拟化通常由系统处理,因此应该没有问题).

NB2: Carefull for path virtualization to 'Wow6432Node' if running in x32 mode on a x64 machine (path virutalization it is normally handle by the system anyway, so it should be no problem).

这篇关于确定是否安装了matlab运行时(最好使用Java)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆