我已经使用efxclipse 3.0.0的目标运行时创建了e4 Application项目。
在测试应用程序的构建时,我运行app.releng pom.xml来生成build xml所需的noenv / noenv / noenv中的文件。
然后我作为ant运行build.xml
,其结果如下
Buildfile: D:\git\application-ide\com.company.application.client.app.releng\build.xml
init-fx-tasks:
do-deploy:
Using base JDK at: D:\Program Files\Java\jdk1.8.0_171\jre
Using base JDK at: D:\Program Files\Java\jdk1.8.0_171\jre
Creating app bundle: application in D:\git\application-ide\com.company.application.client.app.releng\deploy\bundles
Result application bundle: D:\git\application-ide\com.company.application.client.app.releng\deploy\bundles
[fx:deploy] java.io.IOException: Exec failed with code 2 command [[D:\ProgramFiles\InnoSetup5\iscc.exe, /oD:\git\application-ide\com.company.application.client.app.releng\deploy\bundles, C:\Users\USER~1\AppData\Local\Temp\fxbundler5454147882428928742\images\win-exe.image\application.iss] in C:\Users\USER~1\AppData\Local\Temp\fxbundler5454147882428928742\images\win-exe.image
[fx:deploy] at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)
[fx:deploy] at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
[fx:deploy] at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
[fx:deploy] at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697)
[fx:deploy] at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366)
[fx:deploy] at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173)
[fx:deploy] at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
[fx:deploy] at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
[fx:deploy] at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:286)
[fx:deploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[fx:deploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[fx:deploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[fx:deploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[fx:deploy] at java.lang.reflect.Method.invoke(Method.java:498)
[fx:deploy] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[fx:deploy] at org.apache.tools.ant.Task.perform(Task.java:348)
[fx:deploy] at org.apache.tools.ant.Target.execute(Target.java:435)
[fx:deploy] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[fx:deploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
[fx:deploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
[fx:deploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[fx:deploy] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
[fx:deploy] at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
[fx:deploy] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:460)
[fx:deploy] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:142)
BUILD FAILED
D:\git\application-ide\com.company.application.client.app.releng\build.xml:44: Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
Total time: 6 seconds
我对InnoSetup5的关注度较低(但如果会有关于此的评论则会更新)错误,因为它声明捆绑包是在Result应用程序包中创建的:D:\ git \ application-ide \ com.company.application。 client.app.releng \部署\束
现在,当我运行生成的Application.exe文件时,应该加载fxml文件的部分是空白的。
我很确定@LocalInstance FXMLLoader中使用的路径是正确的,因为它在运行应用程序产品时正确加载。
还试图添加包含fxml文件的插件procject的pom.xml,但在编译为exe文件时仍然没有加载
<resource>
<directory>src</directory>
<includes>
<include>**/*.fxml</include>
</includes>
</resource>