I am trying to reduce the size of my application by limiting the modules that it includes. I already did this for my runtime using jlink
. However, when I run
Using the command line javapackager
, you can make use of the deploy options --limit-modules
and --add-modules
such as:-
javapackager -deploy
--add-modules java.base,java.desktop...
--limit-modules java.base,java.desktop,java.naming...
--module-path your.mods.dir
-native -outdir OUTPUT_DIR -outfile APPLICATION_NAME
-srcdir PACKAGE_SRC_DIR -srcfiles APPLICATION.jar -appclass MAIN_CLASS
-name "YourApplication" -title "SelfContained"
Or colloquially a deploy ant task would consist of something like:-