参考网上众多大牛的搭建方法,在CentOS6.3环境上安装Oracle 11G。OS为64bit。
在执行sh ./database/runInstaller -silent -noconfig -responseFile ./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 com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
at com.jgoodies.looks.LookUtils.(Unknown Source)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
at oracle.install.commons.util.Application.startup(Application.java:758)
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这几个环境变量一场引起的
查了国内的资料,解决方法没有用,或都指明了详细的原因。
最后从外文网站查看到,原来是系统中设置了DISPLAY环境变量
执行:
unset DISPLAY
然后再执行runInstaller.sh,执行成功
: