Wrong Java version when calling via system()
Ältere Kommentare anzeigen
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!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!