How do I open R2012a project on R2016a ?

조회 수: 3 (최근 30일)
Jackson Isaac
Jackson Isaac 2016년 7월 2일
댓글: Jackson Isaac 2016년 7월 22일
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