MATLAB Answers

MATLAB 2018b hangs on splash screen in ubuntu 16.04 (unsupported java probably)

조회 수: 5(최근 30일)
Andrea Nardin
Andrea Nardin 21 Oct 2018
댓글: Aleti venkatesh 25 Jan 2020

Hello, I have a problem with MATLAB 2018b in ubuntu 16.04: it hangs on splash screen. Previously I had MATLAB 2016b and everything worked fine. I am currently able to run matlab only with the -nodesktop option. A test log output created during the splash screen hanging reports:

[Warning: A Java exception occurred trying to load the
com/mathworks/mlwidgets/help/DocCenterDocConfig class:
Java exception occurred:
java.lang.UnsupportedClassVersionError: com/mathworks/helpsearch/DocPathBuilder
: Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
	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 java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
	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 java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:195)
	at
        com.mathworks.jmi.OpaqueJavaInterface.findClass(OpaqueJavaInterface.java:137)] 
Exception in thread "AWT-EventQueue-0": java.lang.UnsupportedClassVersionError: com/mathworks/search/SearchField : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
	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 com.mathworks.mde.desk.MLMainFrame.<init>(MLMainFrame.java:65)
	at com.mathworks.mde.desk.MLDesktop.createMainFrame(MLDesktop.java:1639)
	at com.mathworks.widgets.desk.Desktop.initMainFrame(Desktop.java:276)
	at com.mathworks.mde.desk.MLDesktop.initMainFrameFromThread(MLDesktop.java:833)
	at com.mathworks.mde.desk.MLDesktop.access$600(MLDesktop.java:219)
	at com.mathworks.mde.desk.MLDesktop$Initializer.run(MLDesktop.java:1170)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
	at java.awt.EventQueue.access$300(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:706)
	at java.awt.EventQueue$3.run(EventQueue.java:704)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

This is probably a java related problem. I am currently using openjdk 1.8 while the command "version -java" in MATLAB outputs

>> version -java
ans =
      'Java 1.7.0_95-b00 with Oracle Corporation OpenJDK 64-Bit Server VM mixed mode'

I don't know if it matters but I had not licensed MATLAB for the root user.

  댓글 수: 1

Aleti venkatesh
Aleti venkatesh 25 Jan 2020
sir this type of error i got at the time execution of a program then what can i do sir please help me sir

댓글을 달려면 로그인하십시오.

답변(1개)

Raymond Chiu
Raymond Chiu 24 Oct 2018
편집: Raymond Chiu 24 Oct 2018
2018b on Ubuntu 16.04
>> version -java
ans =
'Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode'
# https://xunyunliu.github.io/post/install_matlab/
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/matlab.png
Name=MATLAB R2018b
Comment=Start MATLAB - The Language of Technical Computing
Exec=/usr/local/MATLAB/R2018b/bin/matlab -desktop -useStartupFolderPref
/bin/matlab -desktop"
Categories=Development;

  댓글 수: 1

Andrea Nardin
Andrea Nardin 27 Oct 2018
Hello Raymond, thank you for your answer. I see that you run another java version, how can I end up in the same situation? (The script for creating the desktop entry cannot solve my issue)

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by