问题
./runInstaller -silent -force -ignorePrereq -ignoreSysPrereqs -responseFile /home/oracle/database/response/db_install.rsp Exception in thread "main" java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at java.awt.Toolkit$2.run(Toolkit.java:821) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) at javax.swing.UIManager.initialize(UIManager.java:1262) at javax.swing.UIManager.maybeInitialize(UIManager.java:1245) at javax.swing.UIManager.getUI(UIManager.java:851) at javax.swing.JPanel.updateUI(JPanel.java:104) at javax.swing.JPanel.<init>(JPanel.java:64) at javax.swing.JPanel.<init>(JPanel.java:87) at javax.swing.JPanel.<init>(JPanel.java:95) at oracle.sysman.oii.oiif.oiifo.OiifoOCMUI.<init>(OiifoOCMUI.java:125) at oracle.sysman.oii.oiif.oiifo.OiifoOCMInterfaceManager.<init>(OiifoOCMInterfaceManager.java:79) at oracle.sysman.oii.oiif.oiifo.OiifoOCMInterfaceManager.getInstance(OiifoOCMInterfaceManager.java:124) at oracle.install.ivw.db.driver.DBInstaller.run(DBInstaller.java:123) at oracle.install.commons.util.Application.startup(Application.java:869) at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164) at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181) at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265) at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114) at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)
解决方法
通过搜索查找解决方法都提示是Java的问题。但Oracle会先解压出jdk包在自己的tmp目录下,所以该问题不是由PATH、CLASSPATH、JAVA_HOME这几个Java环境变量引起的。
执行
unset DISPLAY
即可解决该问题。
最后,再执行 ./runInstaller
命令,即可执行成功。