开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜