是否可以在运行时为install4j'd Java应用程序禁用启动画面?

时间:2012-10-02 11:35:08

标签: java splash-screen install4j headless

我安装了一个安装了install4j的Java应用程序。在某些测试环境中,将其在无头环境中启动非常有用。但是,目前这个抛出:

java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
    at java.awt.Window.<init>(Window.java:431)
    at java.awt.Frame.<init>(Frame.java:403)
    at java.awt.Frame.<init>(Frame.java:368)
    at com.install4j.runtime.splashscreen.JavaSplashScreen.<init>(Unknown Source)
    at com.install4j.runtime.splashscreen.JavaSplashController.show(Unknown Source)
    at com.install4j.runtime.launcher.SplashEngine.showSplashScreen(Unknown Source)
    at com.install4j.runtime.launcher.Launcher.main(Unknown Source)

由于启动画面是程序中唯一需要显示的部分,如果可以使用命令行开关禁用它,或者至少在程序本身的某些代码中禁用它(这似乎不太可能)选项,因为在我的代码运行之前抛出此异常)。有这样的选择吗?

1 个答案:

答案 0 :(得分:0)

install4j中没有这样的运行时选项,你必须配置一个单独的命令行启动器,而不需要启动画面。