Matlab Builder JA - UnsupportedClassVersionError: Unsupported major.minor version 52.0
Mostrar comentarios más antiguos
Hi, While trying to use the Matlab Builder JA toolbox (deployment tool), we can't make work the Library compiler to create a Java package with our Matlab exported function (Matlab file attached to this message). We followed the tutorial and worked intensively on the examples available in the Matlab documentation at the Matlab Builder JA toolbox. Then, we used the createMatlabShortcut.m to launch the Matlab with the right JVM version but it didn't work. Please could you help us with this problem. Best regards, Stéphane
3 comentarios
Daniel Stuart
el 12 de Mayo de 2015
I am experiencing the same issue.
Igor Volzhanin
el 27 de Mayo de 2015
Same error here when trying to compile any Matlab function in a Java Package.
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) Error: An error occurred while shelling out to javac (error code = 1). Unable to build executable (specify the -v option for more information).
Krystal Wang
el 3 de Jun. de 2015
You need to use jdk1.7.0 instead of jdk1.8.0. To make sure it, you need to delete jdk1.8.0 on your computer. If you use mac, you need to delete: /Library/Java/JavaVirtualMachines/jdk<version>.jdk /Library/PreferencePanes/JavaControlPanel.prefPane /Library/Internet Plug-Ins/JavaAppletPlugin.plugin Then, you need to reinstall jdk1.7.0, and you will succeed to generate the .jar file.
Respuestas (0)
Categorías
Más información sobre Deploy to Java Applications Using MWArray Data API en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!