Azzera filtri
Azzera filtri

How do I open R2012a project on R2016a ?

3 visualizzazioni (ultimi 30 giorni)
Jackson Isaac
Jackson Isaac il 2 Lug 2016
Commentato: Jackson Isaac il 22 Lug 2016
I have a project written using R2012a (on Windows machine) which is converted to Java and packaged as a jar file.
I currently run R2016a with R2016a runtime compiler on Mac OS X. I need to package the project using R2016a inorder to use it with the latest version of javabuilder on my current system.
When I try to open the .prj file it says Not a valid project: < filename>.prj
I saw a post on how it should be done in R2014a but I am unable to solve it for R2016a.

Risposte (1)

Prasad Mendu
Prasad Mendu il 18 Lug 2016
Modificato: Prasad Mendu il 18 Lug 2016
Although .jar files created in earlier versions of MATLAB can be opened in the latest release, the project files would have been obtained by compiling the code against the OS specific MATLAB Compiler Runtime(MCR). So you might need to try creating the project file again using the MATLAB R2016a on OS X, or just use the .jar file created earlier in your application.
  1 Commento
Jackson Isaac
Jackson Isaac il 22 Lug 2016
I tried to build the project on R2016a but I get the following error regarding java version mismatch:
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.
I have java 1.8 installed. I also tried to install java 1.7 and build the package but still the same error.

Accedi per commentare.

Categorie

Scopri di più su Java Package Integration in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by