How do I open R2012a project on R2016a ?

3 views (last 30 days)
Jackson Isaac
Jackson Isaac on 2 Jul 2016
Commented: Jackson Isaac on 22 Jul 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.

Answers (1)

Prasad Mendu
Prasad Mendu on 18 Jul 2016
Edited: Prasad Mendu on 18 Jul 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 Comment
Jackson Isaac
Jackson Isaac on 22 Jul 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.

Sign in to comment.

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!