How do I open R2012a project on R2016a ?

3 次查看(过去 30 天)
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.

回答(1 个)

Prasad Mendu
Prasad Mendu 2016-7-18
编辑:Prasad Mendu 2016-7-18
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 个评论
Jackson Isaac
Jackson Isaac 2016-7-22
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Java Package Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by