ridiculous - javax.swing.text.html.HTMLEditorKit.Parser needs X11 server to work

ridiculous - javax.swing.text.html.HTMLEditorKit.Parser needs X11 server to work

Post by Nebojsa To » Sat, 15 Jan 2005 06:50:35


Hello,

I wrote application which doesn't use graphic at all. One part of
application
needs Parser class from javax.swing.text.html.HTMLEditorKit. The ridiculous
fact is when I try to instantiate parser, jvm wants to connect to X11
server.
That means that I need X-server for simple html text parsing. Is there any
workaround for this issue ? Any help appreciated.

best regards,
Nebojsa
 
 
 

ridiculous - javax.swing.text.html.HTMLEditorKit.Parser needs X11 server to work

Post by Jon Caldwe » Sat, 15 Jan 2005 08:02:13


Try passing "-Djava.awt.headless=true" into the java command.

 
 
 

ridiculous - javax.swing.text.html.HTMLEditorKit.Parser needs X11 server to work

Post by Nebojsa To » Sat, 15 Jan 2005 22:22:52

Thank you, this works !

best,
Nebojsa
 
 
 

ridiculous - javax.swing.text.html.HTMLEditorKit.Parser needs X11 server to work

Post by Jon Caldwe » Sun, 16 Jan 2005 07:43:13


I didn't explain this too well. In case you are curious, Java tries to
access X's font server unless the JVM is in headless mode, in which case
this, and graphics functions are implemented in pure Java, instead of
OS-dependencies.