This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Headless Exception in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Headless Exception in Linux" Watch "Headless Exception in Linux" New topic

Headless Exception in Linux

Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239

I am resizing an image using some classes from the AWT. On this line:

I get a HeadlessException in Linux, works fine in Windows.

How can I work around this?

Below is the entire code:



Geoffrey Falk
Ranch Hand

Joined: Aug 17, 2001
Posts: 171
Take a look at PJA Toolkit. This allows you to use AWT classes in headless mode.

We use it for font metric calculations in a server-side application.


Sun Certified Programmer for the Java 2 Platform
Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239
Thank you!
I agree. Here's the link:
subject: Headless Exception in Linux
It's not a secret anymore!