Wednesday, September 20, 2006

GAH!

You can't use a java.awt.Color in WebObjects, because to use AWT at all on OS X requires connection to the WindowServer.  And unless you're mad, you probably aren't running your WOA as root.  This means I can't do things like, ooh, I don't know, making a PDF table have a white border instead of a black one.

2 comments:

Anonymous said...

really? I don't do WebObjects, but I've been using java.awt stuff without a connection to the WindowServer by using:

java.awt.headless=true

when launching Tomcat.

Does this not work?

Graham Lee said...

Hmmm...it's no longer my web app to care about, but that probably would work. The point is that it's senseless; the java.awt.Color class just defines a colourspace (in this case, sRGB) and a colour, none of which needs to talk to a graphical environment. It's not like I want to draw a line...