This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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!
It is sorta covered in the JavaRanch Style Guide.
subject: Headless Exception in Linux
Similar Threads
Image to BufferedImage converter
lagging on loading image
Image Resizing Help
Image Resizing Woes
works on WinXP jdk 1.6 but not Linux jdk 1.5