我打算将我的MATLAB代码转换成java。我正在跟踪这的官方文档。但是在使用javac编译之后,我无法运行最后一步。当我从cmd java -classpath .;"C:\Program Files\MATLAB\MATLAB Runtime\v93\toolbox\javabuilder\jar\javabuilder.jar";makesqr.jar getmagic 5运行这个
我知道错误了
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the re
quired library mclmcrrt9_3.dll on java.library.path.
This library is typically installed along with MATLAB or the MATLAB Runtime. Its
absence may indicate an issue with that installation or
the current path configuration, or a mismatch with the architecture of the Java
interpreter on the path.
MATLAB Runtime version this component is attempting to use: 9.3.
Java interpreter architecture: win32.在我看来,这是一个MATLAB运行时错误,而不是一个java错误,我无法修复它。
我的设置如下
我已经使用在线安装程序安装了MATLAB,并将C:\Program Files\MATLAB\MATLAB Runtime\v93\runtime\win64添加到我的PATH变量中。所以我不知道我还需要做什么才能让第17步起作用。我注意到的一件事是错误消息显示
Java interpreter architecture: win32.我不知道为什么这个体系结构显示为win32,尽管我已经安装的所有软件都是64位的。
发布于 2018-02-19 11:31:03
几天后,我又回到这个问题上,发现了这个问题。多亏了这条线,我重新检查了安装在我的机器上的java。结果是32位,而不是64位。安装正确的版本后,问题就解决了。
https://stackoverflow.com/questions/48644586
复制相似问题