1

I have an existing javafx project in eclipse (JDK 1.8). The goal ist to create a msi package which contains an executable. But the java runtime should NOT be included. But when I start the application it shows following error:

Failed to find library ...\runtime\bin\server\jvm.dll

The build.xml fx:deploy target looks like this:

    <fx:deploy embedJNLP="true" 
        install="false" 
        shortcut="true" 
        extension="false" 
        includeDT="false" 
        offlineAllowed="true" 
        outdir="${basedir}/deploy" 
        outfile="test" 
        nativeBundles="msi" 
        updatemode="background" 
        verbose="true">

        <fx:platform basedir=""/>
        <fx:info title="test" vendor="test GmbH" />

        <fx:application refId="fxApplication" />
        <fx:resources refid="appRes" />
        <fx:preferences install="false" shortcut="true" />

    </fx:deploy>

The platform basedir is configured to NOT include runtime. <fx:platform basedir=""/>

How to configure project to start with the default installed JRE?

Sebastian Siemens
  • 2,302
  • 1
  • 17
  • 24

1 Answers1

1

I am not sure, but my guess is, there is currently a bug within the javafx packager. Even when <fx:platform basedir=""/> correctly results in not including a runtime the generated config still includes an entry to a non existing runtime folder

app.runtime=$APPDIR\runtime 

Deleting this entry within the config next to your generated jar should result in using the default installed JRE on the system.

crusam
  • 6,140
  • 6
  • 40
  • 68
  • Yes, this is correct and it works now. How can I configure fxpackager to not generate this entry in config file? Or should I change the config file during deployment? Many thanks!!!! – Sebastian Siemens Apr 29 '16 at 06:28
  • As I said, I believe its a bug and therefore it might not be configurable, but my knowledge about the fxpackager is limited. Could be worth to check, if it is already filed as a bug and maybe there are already work arounds explaining how to avoid it. You could for example manually modify the config-file in your own ant task and remove the runtime property from the config, if the property exists. – crusam May 02 '16 at 10:12