Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Chisisi Massri   on Jun 06 In Java Category.

  
Question Answered By: Mae Roberts   on Jun 06

my web  application is running under tomcat 5.5, jdk 6 update 2, Centos 5 linux  without x11 server installed.

i also use the below command :
JAVA_OPTS="-Xms16m -Xmx48m -Djava.awt.headless=true"

but when i call the method  in "linux" i get the below exception:

java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:406)
at java.awt.Frame.<init>(Frame.java:402)
at java.awt.Frame.<init>(Frame.java:367)
at javax.swing.JFrame.<init>(JFrame.java:163)
at mypackage.MyClass.getImage(MyClass.java:103)
...

and the the line which produces exception  in 'getImage()' is:

g2d.drawImage(image, 0, 0, newWidth, newHeight, 0, 0, image.getWidth(), image.getHeight(), new JFrame());
in spite of setting headless property to true i get the error.
any Idea?

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on problem with java2d in linux vps Or get search suggestion and latest updates.


Tagged: