The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Bringing Swing to the Web
Subject:  Headless...
Date:  2006-04-21 07:14:31
From:  kooss
Response to: Headless...


Unfortunately, due to the way that the Container base class (which all swing components ultimately extend from) is implemented, no swing components can even be instantiated (let alone drawn) on a machine that is headless.

This is all because of the following block of static code in the Container class :


static {
/* ensure that the necessary native libraries are loaded */
Toolkit.loadLibraries();
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
}


I can't really see any way around this.

 Feed java.net RSS Feeds