Oracle 12c 安装错误:“异常...无法初始化类 sun.awt.X11.XToolkit”

Ven*_*ddi 6 java oracle

我一直在尝试在 Ubuntu 14.10 上安装 oracle 12 c,但遇到了下面提到的错误。请有人检查一下并建议我如何解决这个错误?

Checking Temp space: must be greater than 500 MB.   Actual 429214 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4041 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] Y


>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-27_11-15-08PM. Please wait ...oracle@v3nky-HP-Pavilion-dv6-Notebook-PC:~$ No protocol specified
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:171)
    at java.awt.Toolkit$2.run(Toolkit.java:834)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
    at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
    at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1852)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:557)
    at oracle.install.commons.util.Application.startup(Application.java:792)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:355)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:130)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:161)
Run Code Online (Sandbox Code Playgroud)

Leo*_*lva 7

检查系统中是否安装了某些 JDK:

$ java -version
Run Code Online (Sandbox Code Playgroud)

安装 JDK 7 解决了我的问题:

$ sudo apt-get install openjdk-7-jre-headless
Run Code Online (Sandbox Code Playgroud)

如果问题仍然存在,请以 root 身份登录,然后执行:

$ xhost +
Run Code Online (Sandbox Code Playgroud)

切换回另一个用户并再次运行安装。


小智 3

我也有这个。作为 root,我xhost +首先执行,然后它就起作用了。