I have a gradle project using gitlab's CI, unforunately using any Swing classes results in:
(我有一个使用gitlab的CI的gradle项目,不幸的是,使用任何Swing类都会导致:)
java.awt.AWTException: headless environment
(java.awt.AWTException:无头环境)
I found one answer at Easiest way to unit test SWT and Swing apps in a headless environment?
(我找到了在无头环境中对SWT和Swing应用程序进行单元测试的最简单方法的一个答案?)
that mentioned using Xvfb, which seems like it would work, but didn't elaborate because there was a tool-specific simpler option.(提到使用Xvfb似乎有效,但由于存在特定于工具的更简单选项而没有详细说明。)
If Xvfb would work, how does it need to be configured in my project?(如果Xvfb可以工作,则如何在我的项目中对其进行配置?)
I couldn't find any resources for gitlab/gradle.(我找不到gitlab / gradle的任何资源。)
Is there a simpler option specific to gitlab?(是否有特定于gitlab的简单选项?)
ask by jeffrey.d.m translate from so