-
Notifications
You must be signed in to change notification settings - Fork 46
Use of headless JRE causes problems #15
Comments
Thanks for your report. There has been some previous discussion of this issue here: docker-library/openjdk#46 I'm curious whether setting |
Nope, setting that property didn't change anything for that particular problem. It just feels "more correct" that way; and maybe other libraries are smarter than JFreeChart? I've pushed my test web app: https://github.com/hho/awttest |
I can't see how JFreeChart can draw a chart without using the |
FWIW, I've asked the maintainers of the I don't think we shoud add |
Yeah, this is probably better handled in the |
👍 |
@hho This has been fixed in the |
Thanks! Your turnaround time on this one is amazing!! 👍 👍 👍 |
Well, it certainly helps that we discussed it almost a month ago 🤘 |
The Java image has been pushed and I can confirm that your Dockerfile now results in Jetty image which works with java.awt. Thanks again! |
No problem @hho. Thanks for confirming the fix. |
While the default image is indeed fixed, the alpine based image is not however :( |
@tlvenn See docker-library/openjdk#73 where we discussed a workaround. |
When a webapp tries to render text (for example, while generating a chart with JFreeChart, PDFs etc.), a NPE is thrown:
This happens because the underlying JRE is the
openjdk-8-jre-headless
Debian package. The exception goes away when I add thefontconfig
package to the image. [1]I'd also suggest to set the default
JAVA_OPTIONS
to-Djava.awt.headless=true
instead of leaving it blank. While that's not strictly necessary, it probably makes sense to tell any running app not to create dialogs etc. [2]The text was updated successfully, but these errors were encountered: