JavaFX Application does not start when JAVA_HOME is set
<p>I package my JavaFX Application with java 1.8u45 and Inno5 as an .exe file with the ant. And the executable works when installing it on a computer, where either Java 8 is installed and set as JAVA_HOME environment variable or when no java is installed at all. But if e.g. java 1.6 or less is installed and the JAVA_HOME variable is set to java 1.6 the application will not start with the very generic error <code>Failed to start jvm</code>. Starting the bundled .jar file via <code>java -jar foobar.jar</code> either causes a failure and stops jvm entirely or prints <code>unsupported major.minor version 52.0</code>.</p>

<p>How can I tell JavaFX to never use JAVA_HOME? </p>

<p>The application is packaged as an exe with the fxbuilder, using:</p>

<pre><code>    &lt;fx:deploy verbose="true" embedJNLP="false" extension="false" includeDT="false" offlineAllowed="true" outdir="${basedir}/target/deploy" outfile="application" nativeBundles="exe" updatemode="background"&gt;
        &lt;!-- To list all classes loaded --&gt;
        &lt;!--&lt;fx:jvmarg value="-verbose:class"/&gt;

        &lt;fx:platform basedir="${java.home}" /&gt;--&gt;
        &lt;fx:info title="App" vendor="Me" /&gt;

        &lt;fx:application refId="fxApplication" /&gt;
        &lt;fx:resources refid="appRes" /&gt;
    &lt;/fx:deploy&gt;
</code></pre>