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

N

Nebojsa Topolscak

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
 
J

Jon Caldwell

Nebojsa said:
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
Try passing "-Djava.awt.headless=true" into the java command.
 
J

Jon Caldwell

Nebojsa said:
Thank you, this works !

best,
Nebojsa
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top