Wrong Java version when calling via system()
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!