简体   繁体   English

Exe包装的JavaFX应用程序(带有Launch4J)无法打开其他阶段

[英]Exe wrapped JavaFX Application (with Launch4J) doesn't open other stages

I have wrapped my JavaFX application with Launch4J. 我已经用Launch4J包装了JavaFX应用程序。 The main stage of the app opens up and runs just fine (with the exception of the CSS not loading) but it does not open up other stages which I use for settings and such. 该应用程序的主要阶段可以打开并正常运行(CSS未加载除外),但它不会打开我用于设置等的其他阶段。

Launch4J config: Launch4J配置:

 <launch4jConfig>
   <dontWrapJar>false</dontWrapJar>
   <headerType>gui</headerType>
   <jar>C:\Users\xxx\IdeaProjects\xxx\out\artifacts\xxx\xxx.jar</jar>
   <outfile>C:\Users\xxxx\TEST\bin\test.exe</outfile>
   <errTitle></errTitle>
   <cmdLine></cmdLine>
   <chdir>.</chdir>
   <priority>normal</priority>
   <downloadUrl></downloadUrl>
   <supportUrl></supportUrl>
   <stayAlive>false</stayAlive>
   <restartOnCrash>false</restartOnCrash>
   <manifest></manifest>
   <icon></icon>
   <jre>
     <path>C:\Users\xxx\TEST\jre1.8.0_25</path>
     <bundledJre64Bit>false</bundledJre64Bit>
     <bundledJreAsFallback>false</bundledJreAsFallback>
     <minVersion>1.8.0_01</minVersion>
     <maxVersion>1.8.0_25</maxVersion>
     <jdkPreference>preferJre</jdkPreference>
     <runtimeBits>64/32</runtimeBits>
   </jre>
 </launch4jConfig>

Works fine when run off compiler. 运行编译器时工作正常。 Any reasons as to why other stages work? 为什么其他阶段起作用?

Are there any better tools for packaging JRE's with JavaFX apps? 有没有更好的工具可以将JRE与JavaFX应用程序打包在一起? Ones that don't need to be installed would be good because I am limited by enterprise access controls and such. 不需要安装的设备会很好,因为我受到企业访问控制等的限制。

Issue was FXML file path was declared as: 问题是FXML文件路径声明为:

 'src/etc/etc'

Changing this to just 将此更改为

'/etc/etc'

Seems to work. 似乎可以工作。 I guess it is to do with when its compiled it doesn't have the src folder. 我想这是因为它的编译时没有src文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM