2

我正在尝试从本地拥有的 .jar 文件中创建本机可执行文件。除了我当前正在使用参数 ( abc) 执行 jar 文件之外,一切看起来都很好:

java -Dappbase=http://localhost:80/getdown/xyz/ -jar getdown-1.7.1.jar abc

这是我用来生成本机图像的内容:

javapackager \
  -deploy -BjvmProperties=appbase=http://localhost:80/getdown/xyz/ \
  -native \
  -outdir result \
  -outfile sample \
  -srcfiles getdown-1.7.1.jar \
  -appclass com.threerings.getdown.launcher.GetdownApp

如何javapackager表示我希望它作为参数com.threerings.getdown.launcher.GetdownApp运行?abc

谢谢

4

1 回答 1

0

这可能会对您有所帮助。

来源: https ://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm

https://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CACIJFHB

 <fx:application name="Sample app"
    mainClass="test.MyApplication">
  <!-- unnamed arguments -->
  <fx:argument>Something</fx:argument>
  <!-- value with spaces that are generated at build time -->
  <fx:argument>JRE version: ${java.version}</fx:argument>
  <!-- example of value using a special character -->
  <fx:argument>true &amp; false</fx:argument>
 </fx:application> 
于 2018-10-04T09:44:54.880 回答