Thursday, June 25, 2009

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

root@huynhnguyen-desktop:/desktop-share# ./zdesktop_1_0_build_1593_linux_i686.sh
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.Launcher.main(Unknown Source)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
at java.awt.Button.(Unknown Source)
at java.awt.Button.(Unknown Source)
at com.install4j.runtime.installer.frontend.WizardScreenExecutor.initAWT(Unknown Source)
at com.install4j.runtime.installer.frontend.WizardScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.frontend.InstallerWizardScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.Installer$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Could not display the GUI. This application needs access to an X Server.
If you have access there is probably an X library missing.
*******************************************************************
You can also run this application in console mode without
access to an X server by passing the argument -c
*******************************************************************
An error occurred:
java.lang.RuntimeException
Error log: /tmp/install4jError45685.log

Solution:
run the following command to locate .bash_profile
Code:
$cd
$vi .bash_profile
DISPLAY=:0.0
export DISPLAY
u can also add those lines in .bashrc file similarly

No comments: