I created a JavaFX application, For it I bundled it As a self-contained standalone application, using a private copy of Java Runtime.
But this became my application's size of 166MB, in which 146 Mb size is for jre.
How can I reduce the size of my application or can say size of bundle Runtime JRE?
I read somewhere that some files are optional in jre, So I tried to run my application after removing those files but unable to run the application.
So how can I remove the unused files/folders/modules from the Runtime JRE for my application ?
It is said that
Only a subset of Java Runtime is included by default. Some optional and rarely used files are excluded to reduce the package size, such as all executables. If you need something that is not included by default, then you need to copy it in as a post-processing step.
So by default it is not adding all the files in jre, in that case my application is not running. Application.jar is working fine as it is using system jar. So I add all the reamaining files in post-processing step.
Thanks