开发者

Java headless GUI without java.awt.headless

开发者 https://www.devze.com 2023-02-10 01:50 出处:网络
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 jfree

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

精彩评论

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

关注公众号