File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Getting java.awt.HeadlessException Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Getting java.awt.HeadlessException Exception" Watch "Getting java.awt.HeadlessException Exception" New topic
Author

Getting java.awt.HeadlessException Exception

khushhal yadav
Ranch Hand

Joined: Jun 20, 2007
Posts: 242

Hi All

I am facing issues while installing one tool on Unix Box, which it seems to be using swing at back end ..

Launching installer...

Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
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.zerog.ia.installer.LifeCycleManager.g(DashoA10*..)
at com.zerog.ia.installer.LifeCycleManager.h(DashoA10*..)
at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..)
at com.zerog.ia.installer.Main.main(DashoA10*..)
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.zerog.lax.LAX.launch(DashoA10*..)
at com.zerog.lax.LAX.main(DashoA10*..)
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
[bmcao@lctvd139 ~]$

Any idea what exactly causing this stack flow? I have really got myself crap searching for what causing it. Anyone having idea, please let me know..

My assumption is

1. Either some X11 display variable is not set, as mentioned in stack flow.
If this is the case how to set X11 display variable and what should be its value?

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

2. Otherwise, it might be looking for some graphics controller like X manager, which is not there, eventually
resulting in "No X11 DISPLAY variable was set" to be thrown.

at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
at java.awt.Window.<init>(Unknown Source)


Because in the tool’s installation guide it is written that

You will need a GUI tool to run the adapters installer. Remote
use X Windows or VNC to complete the installation.


rgrds,
Khushhal
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19695
    
  20

The last paragraph says it all. You need a GUI environment like X windows to run it. If you don't have one available yourself, you may perhaps connect to a remote X server (I've done it before, can't remember how to anymore though).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
jQuery in Action, 2nd edition
 
subject: Getting java.awt.HeadlessException Exception