How to pass program arguments to java packager?

526 views Asked by At

I'm trying to create a native executable out of a .jar file I have locally. All looks fine except that I'm currently executing the jar file with an argument (abc):

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

This is what I'm using to generate my native image:

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

How to signal javapackager that I'd like it to run com.threerings.getdown.launcher.GetdownApp with abc as an argument?

Thanks

1

There are 1 answers

0
Pandey Amit On

This may help you.

Sources : 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>