views:

462

answers:

2

Hi,

This is with reference to my question: java.awt.HeadlessException Applets not displayed.

There is a next question that has come up from the Sys Admins. They are asking -

"Why does java1.5 now requires the explicit export DISPLAY in tomcat at all when java1.4 did not?"

So what has changed in java1.5 which is causing it to throw a java.awt.HeadlessException without the explicit export DISPLAY?

Is there a change in a way applets works in java1.5? Has Sun changed internal working of AWT or Swing in java1.5? What is the reason that java1.4 was able to see the xvfb libraries running on Unix but java1.5 cannot see without an explicit export DISPLAY?

A: 

I run tomcat on a system that doesn't have a head, and therefore doesn't have an X server at all, and I don't need to export DISPLAY.

Paul Tomblin
+1  A: 

I didn't read it all, but here are the relevant information about the changes between 1.5 and 1.4 related to headless.

support "headless" Java

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4281163

AWT Enhancements in the Java

http://java.sun.com/j2se/1.5.0/docs/guide/awt/AWTChanges.html#headless

I hope that helps.

OscarRyz