更新时间:2021-07-15 01:28:02
包装信息
下面的应用程序是使用命令行 javafxpackager打包的工具。 JavaFX还提供 ant任务以进行打包。我相信你可以创建一个用于打包的ant脚本,并从Eclipse内部运行它的任务。
The app below was packaged using the command line javafxpackager tool. JavaFX also provides ant tasks for packaging. I believe you could create an ant script for packaging and run it's tasks from inside Eclipse.
e(fx)clipse 插件通过包装JavaFX ant任务提供集成的JavaFX打包功能。使用Eclipse开发JavaFX应用程序时,强烈建议使用e(fx)clipse。
The e(fx)clipse plugin provides integrated JavaFX packaging functionality by wrapping the JavaFX ant tasks. When developing JavaFX applications with Eclipse, use of e(fx)clipse is highly recommended.
验证JavaFX包装
jar xf< jarfile>
)。 META-INF \ MANIFEST.MF
)。jar xf <jarfile>
).META-INF\MANIFEST.MF
).C:\dev\javafx\willow\dist>jar xf willow.jar
C:\dev\javafx\willow\dist>type MANIFEST.MF
Manifest-Version: 1.0
JavaFX-Version: 2.1
JavaFX-Application-Class: org.jewelsea.willow.Willow
JavaFX-Class-Path: lib\image4j.jar lib\PDFRenderer-0.9.1.jar
Created-By: JavaFX Packager
Main-Class: com/javafx/main/Main
C:\dev\javafx\willow\dist>java -jar willow.jar
对于您的清单 JavaFX-Application-Class
条目会有所不同,可能不需要 JavaFX-Class-Path
属性。
For your manifest the JavaFX-Application-Class
entry will vary and the JavaFX-Class-Path
attribute is probably not needed.
然后我可以使用 java -jar< jarfile>
从命令行运行我使用的示例jar。
The example jar I used can then be run from the command line using java -jar <jarfile>
.