Wrong Java version when calling via system()
显示 更早的评论
Hi,
I have java class program Main.class in folder F. When I do in terminal inside folder F
$java Main
the program works fine
When I call in Matlab
s = system(['cd ', F, ' && java ',Main]);
I get the error
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: Main : Unsupported major.minor version 52.0
This is strange, since I have Java version 51.0 installed in my MAC. Could it be that the Matlab system() call uses a different java version than that of the MAC OSX system?
Note: I've been running this command in a different machine, with an older Matlab version without problems.
Thank you for any pointers!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!