I'm trying to downgrade Matlab java from 7 to 6 because of some problem in Ubuntu like problem in creating GUI (using GUIDE) in Matlab.The Application and figures that I created with Matlab R2014a in Windows 8.1 have a lot of problems here.The size,dark Gray colour of windows,design of buttons and graphs changed in ubuntu and more.. .
I read in Matlab Community site and ask ubuntu that I must downgrade java to 1.6 for this problem. So this is my procedure:
sudo apt-get install oracle-java6-installer (Getting java oracle in terminal)
export MATLAB_JAVA=/usr/lib/jvm/java_6_oracle/jre (Set Matlab java in terminal- address is the path of java that downloaded)
After running matlab with ./matlab I have this error :
Fatal Error on startup: Cannot locate or initialize class com/mathworks /jmi/OpaqueJavaInterface. java.lang.UnsupportedClassVersionError: com/mathworks/jmi/OpaqueJavaInterface : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I'm downgrading java 1.7 of Matlab R2014a to 1.6. When I use downloaded java 1.7 with terminal and connect it to Matlab there isn’t any problem so I think the problem is only in downgrading it to 1.6.
Thanks.
PS. This is some other discussion that may help: When I run guide in matlab it opens a blank all gray window. Whats going on?