Java headless GUI without java.awt.headless
According to this article, the only way to get headless operation is by setting java.a开发者_StackOverflow社区wt.headless
. I'm working on the implementation of a maven plugin and the code calls jfreechart, and it flashes my Mac's screen if I don't set headless. But it's not really polite for me to call System.setProperty
(with global impact) in my maven plugin.
Is there any more tightly-scoped way to get headless operations?
Maybe you could set the <systemProperties>
for your plugin only within your plugin configuration in this way?
<configuration>
<systemProperties>
<property>
<name>java.awt.headless</name>
<value>true</value>
</property>
</systemProperties>
</configuration>
精彩评论