Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting java.awt.HeadlessException Exception

 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic