This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Headless Exception in Linux" Watch "Headless Exception in Linux" New topic
Author

Headless Exception in Linux

Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239
Hi;

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:



Thanks,

Luke


Luke
SCJP
Geoffrey Falk
Ranch Hand

Joined: Aug 17, 2001
Posts: 171
    
    1
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.

Geoffrey


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

Joined: Sep 30, 2004
Posts: 239
Thank you!
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Headless Exception in Linux
 
It's not a secret anymore!