The AWTRenderer won't appear from the command line throwing a HeadlessException >fop -fo examples\fo\basic\normal.fo -awt 18-Sep-2012 14:00:42 org.apache.fop.cli.Main startFOP SEVERE: Exception java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source) at java.awt.Window.<init>(Unknown Source) at java.awt.Frame.<init>(Unknown Source) at java.awt.Frame.<init>(Unknown Source) at javax.swing.JFrame.<init>(Unknown Source) at org.apache.fop.render.awt.viewer.PreviewDialog.<init>(PreviewDialog.java:110) at org.apache.fop.render.awt.viewer.PreviewDialog.createPreviewDialog(PreviewDialog.java:275) at org.apache.fop.render.awt.AWTRenderer.<init>(AWTRenderer.java:99) at org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:211) at org.apache.fop.cli.Main.startFOP(Main.java:161) at org.apache.fop.cli.Main.main(Main.java:208)
Thanks for the bug report. I confirm that this issue exists in FOP v1.1rc when running on a Windows machine which clearly has a Graphics environment available.
This also happens in trunk in a linux environment (Ubuntu 12.04 3.2.0-30-generic). I'll take a look
Ok, I took a quick look at this, and it seems to be caused by bug#50062. Glenn, would you be alright with me reverting this change? Users can add the "-Djava.awt.headless=true" as Chris suggested, but this shouldn't be the default as it blocks invocation of the AWT renderer.
This has been fixed in r1390331. Please could you make sure that it works on your machine and set the status to fixed if you're happy. Thanks.
Confirmed AWT command line option repaired.
*** Bug 54164 has been marked as a duplicate of this bug. ***