Wrong Java version when calling via system()
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!