Views:

Summary



An error occurs when running the ./run.java OracleConfig command.

Symptoms




./run.java OracleConfig
Exception in thread "AWT-EventQueue-0" 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.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at com.syncsort.bex.utils.OracleConfig.<init>(OracleConfig.java:34)
at com.syncsort.bex.utils.OracleConfig$9.run(OracleConfig.java:783)
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)



Resolution



This error will appear when the environment variable "X window " is not set.

Apply the following setting before running the application:

DISPLAY=:0.0
export DISPLAY

In addition. this error will appear when a graphical X is not installed for this server.

If this is the case, use the the DISPLAY environment variable to export the management console to another machine that is specifically configured for running the graphical user interface (GUI).

Example:

Where xxx.xxx.xxx.xxx is the machine with the GUI, and the Oracle server is yyy.yyy.yyy.yyy.
On yy.yyy.yyy.yyy (Oracle server):

br />----------------------------------------

DISPLAY=xxx.xxx.xxx.xxx:0.0
export DISPLAY
./run.java OracleConfig

----------------------------------------

On xxx.xxx.xxx.xxx (GUI server)

----------------------------------------

xhost + yyy.yyy.yyy.yyy

----------------------------------------

The GUI runs from the host it was started on, but it appears on the GUI server.

As an alternative, use the xming tool to export the GUI.