JAVA 调用matlab 出错总结

1、Java:Unsupported major.minor version 51.0 (unable to load class

出现该错误是由于class编译器的JDK版本高于运行期的JDK版本。

比如我在运行Tomcat servlet时出现该错误,是由于tomcat运行时是1.6的JDK,Eclipse编译时则是1.7


修改方法:保证编译器和运行期的JDK版本一致。


Eclipse修改:

Windows

Window -> Preferences->Java -> Compiler 设置 "Compiler compliance level" 为 1.6 (相应版本)

Tomcat JDK 修改

2、

Caused by: java.lang.UnsatisfiedLinkError: Failed to find the library mclmcrrt8_3.dll, required by MATLAB Builder JA, on java.library.path.
 This library is typically installed along with MATLAB or the MCR, its absence may indicate an issue with that installation or the current path configuration.
The MCR version that this component is trying to use is: 8.3.

①、本机当前安装版本,和引用的Mtalab生成的jar不是同一个版本。升级当前Matlab版本,或使用和本机相同的版本生成 jar文件。

②、查看matlab的jdk版本是否和eclipse中jdk的版本是否相同。

 

 

3、

posted @ 2016-01-06 14:32  海天依色  阅读(1918)  评论(0编辑  收藏  举报