Cannot launch MATLAB guis (GUIDE) on scientific li

2019-08-31 05:03发布

问题:

Problem: GUIDE guis are missing their usual features (drop-down, push-buttons, etc). They just appear as empty windows with borders delineating where the different buttons used to be. The issue appears to be related to the jre version I am using. I don't know how to proceed.

Here's the environment variables matlab is using. /usr/java/default points to the root directory of jre_1.7.0_05 contain bin, lib etc.

------------------------------------------------------------------------
->      (.matlab7rc.sh) sourced from directory (DIR = $MATLAB/bin)
->      DIR = /opt/matlab/R2011b/bin
------------------------------------------------------------------------
        a = argument  e = environment  r = rcfile  s = script
------------------------------------------------------------------------
->  r   MATLAB              = /opt/matlab/R2011b
->      LM_LICENSE_FILE     = (variable not defined)
->      MLM_LICENSE_FILE    = (variable not defined)
->  s   AUTOMOUNT_MAP       = 
->  e   DISPLAY             = :0.0
->  r   ARCH                = glnxa64
->  s   TOOLBOX             = /opt/matlab/R2011b/toolbox
->  r   XAPPLRESDIR         = /opt/matlab/R2011b/X11/app-defaults
->  r   XKEYSYMDB           = /opt/matlab/R2011b/X11/app-defaults/XKeysymDB
->  e   MAX_OPEN_FILES      = 1024
->  s   _JVM_THREADS_TYPE   = 
->  e   MATLAB_JAVA         = /usr/java/default
->  s   MATLAB_MEM_MGR      = 
->  s   MATLAB_DEBUG        = 
->  s   LD_LIBRARY_PATH     = /opt/matlab/R2011b/sys/os/glnxa64:/opt/matlab/R2011b/bin/glnxa64:/opt/matlab/R2011b/extern/lib/glnxa64:/us
r/java/default/lib/amd64/native_threads:/usr/java/default/lib/amd64/server:/usr/java/default/lib/amd64
->  a   arglist             = 
->  e   SHELL               = /bin/bash
->  e   PATH                = /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin

回答1:

Bottom line is a lot of things in MATLAB break with Java 7, revert back to latest Java 6 (you can have both installed at the same time).

Just set $MATLAB_JAVA environment variable to point to a JRE6 installation.