I'm using maven and the javafx-maven-plugin to package my JavaFX as a windows installer using InnoSetup 5 and it all works well. The issue that I have is that jre is included within the installer, rather than using the system jre. This makes the installer to large for my small application and since my target group has jre or jdk installed on their system it is also unnecessary. How do I tell the plugin to not include a JVM and to point to the system JVM?
2 Answers
In this question - Javafxpackager: how do you set the "base JDK"? there are answer about the JRE configuration.
So, if you set <fx:platform basedir=""/>
it will not include JRE into your package (see this document for details).
-
This does not seem to work for javafx-maven-plugin. Setting the bundleArgument `
` to "blank" does not include JRE but does not automatically use the system JRE either. And it causes a 'VM not found' on execution. Is this a javafx-maven-plugin bug or am I missing something? – Tony Mar 27 '16 at 07:10 -
Show your `pom` file please. It would be better. – sanluck Mar 29 '16 at 02:39
-
Sorry for my late reply... but here you'll find the snippet of the pom [link](http://snip.ml/runtime-problem) – Tony Apr 06 '16 at 15:30
Here is the answer from javafx-maven-plugin GitHub issue: https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/293#issuecomment-303016297
If you want to remove the JRE from the bundle, just add this to your plugin-configuration:
<bundleArguments>
<runtime />
<bundleArguments>
The location of the JRE is included inside the generated .cfg
file (jfx/native/...../app
). If there is runtime=
(empty), then the locally installed JRE will be used (you have to have JRE_HOME
being set on Linux-systems).
The runtime=
seems to be set to empty after adding the bundleArguments
, not sure why it didn't work for Tony.

- 3,697
- 9
- 45
- 110