Messages of subject
java.awt.AWTError: Graphics2D can't be instantiated |
kabal
Member since : Dec 24, 2004
Messages : 1
|
Dec 24, 2004 at 2:40 PM
- Exeception:
java.awt.AWTError: Graphics2D can't be instantiated
at com.eteks.java2d.PJAGraphicsEnvironment.createGraphics(PJAGraphicsEnvironment.java:110)
at com.eteks.java2d.PJABufferedImage.createGraphics(PJABufferedImage.java:112)
- Line of code it is blowing up on:
bufferedImage = new PJABufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
graphics = bufferedImage.createGraphics();
- Running Solaris 9, with Java 1.4
Anyone have any suggestions?
|
kaweah
Location : San Jose, CA
Member since : May 4, 2005
Messages : 1
|
May 4, 2005 at 8:01 PM
I'm having a similar problem. I've tried using "getGraphics()" and "createGraphics()" and get only the following trace:
java.awt.AWTError: Graphics2D can't be instantiated
at com.eteks.java2d.PJAGraphicsEnvironment.createGraphics(PJAGraphicsEnvironment.java:110)
at com.eteks.java2d.PJABufferedImage.createGraphics(PJABufferedImage.java:112)
at com.kaweah.wms.WebMapServlet.doGet(WebMapServlet.java:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
The server system is running Linux and Java 1.4.2. I am using the following setProperty command:
System.setProperty ("awt.toolkit", "com.eteks.awt.PJAToolkit");
Then I create a PJABufferedImage and assign it to a BufferedImage reference:
java.awt.image.BufferedImage im =
new PJABufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
As I indicated above, I don't have any trouble until I try to get a Graphics context.
Any suggestions?
Thanks!
Dan
|