我正在使用jdeb生成基于debian的发行版的.deb安装程序。 应用程序安装时没有错误,但是当我尝试运行service myapp start失败,出现下面的exception(应用程序保持运行,但FX场景永远不会显示):
2016-12-30 11:19:51,468 [main] INFO oscsDefaultlifecycleProcessor - Starting beans in phase 0 Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) Caused by: java.lang.UnsupportedOperationException: Unable to open disPLAY at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:68) at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41) at com.sun.glass.ui.Application.run(Application.java:146) at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745)
同时,如果我只是运行sudo /etc/init.d/myapp start它运行没有错误,我的第一个FX场景显示。
Bellow是我的jdeb的mavenconfiguration:
<plugin> <artifactID>jdeb</artifactID> <groupID>org.vafer</groupID> <version>1.5</version> <executions> <execution> <ID>appassembler</ID> <phase>package</phase> <goals> <goal>jdeb</goal> </goals> <configuration> <deb>${project.build.directory}/${project.build.finalname}.deb</deb> <snapshotExpand>false</snapshotExpand> <!-- expand "SNAPSHOT" to what is in the "USER" env variable --> <snapshotEnv>USER</snapshotEnv> <verbose>true</verbose> <controlDir>${basedir}/src/deb/control</controlDir> <dataSet> <data> <src>${project.build.directory}/${project.build.finalname}-uber.jar</src> <type>file</type> <mapper> <type>perm</type> <prefix>/opt/stone/${project.build.finalname}</prefix> <filemode>755</filemode> <user>root</user> <group>root</group> </mapper> </data> <data> <src>src/deb/upstart/${project.build.finalname}.conf</src> <type>file</type> <mapper> <type>perm</type> <prefix>/opt/stone/${project.build.finalname}</prefix> <filemode>755</filemode> <user>root</user> <group>root</group> </mapper> </data> </dataSet> </configuration> </execution> </executions> </plugin>
这是我的安装后脚本:
如何打包linux游戏?
Debian / Ubuntu软件包作为默认安装在根目录下
如何使用dpkg卸载上次安装的应用程序(最近安装的应用程序)?
在32位机器上创build一个64位Debian软件包
如何捆绑linux的应用程序
#!/bin/bash echo Creating symblink... sudo ln -s /opt/stone/acs/acs-uber.jar /etc/init.d/acs echo Creating service... sudo update-rc.d acs start 98 5 . echo Starting service... sudo service acs restart
我将如何主持deb包?
为来自一个源的数据文件创build多个Debian软件包
打包debian文件:debian / copyright文件格式?
是否有一个与.rpm首次安装参数相当的.deb安装文件
CPack DEB生成器:控制文件具有不良权限mdsums 0644!= 0644
总结以上是内存溢出为你收集整理的JavaFX – 导致:java.lang.UnsupportedOperationException:无法打开DISPLAY?全部内容,希望文章能够帮你解决JavaFX – 导致:java.lang.UnsupportedOperationException:无法打开DISPLAY?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)