2
votes

I am using install4j to wrap my JavaFX application into a cross platform installer.

I refer to this and this tutorial to create the installer with auto update silent check.

I have tried multiple times and is unable to find the cause of the issue.

The auto updater is not being invoked (I am guessing unless someone can direct me to verify is it invoked or not)

I can guarantee the updates.xml file is located in the right place as when I manually invoke the Updater.exe on the folder, it is working as intended (dialogs and all came out nicely).

Hoping for any advice as I am really stucked here.

Thanks to all who spend time to answer this question


Edit:

Launcher Integration settings

Do note that the "Launch in a new process" checkbox is ticked or not, the result is still the same - auto-updating is not firing


Edit 2

The following is just to helped all those who faced the current issue.

As mentioned by @IngoKegel, JavFX is not supported yet (currently Install4j Version 6.0.2) thus have to invoked manually.

Using the integrated wizard, a code snippet will be given. Place it in your Java program anywhere you want. The issue I want to address (which was not clear) is just, where to get the jar file for the

import com.install4j.api.launcher.ApplicationLauncher

to work. Based on here,

When you want to use install4j classes within your IDE, you can add $INSTALL4J_HOME/resource/i4jruntime.jar to your classpath (in your IDE). Do not distribute this jar file with your application, install4j will handle this for you.

So, just link the jar file and all will be ok.

1
What are your settings on the "Launcher integration" tab of the updater (on the Installer->Screens & Actions step)? - Ingo Kegel
@IngoKegel, Check the edit in the question - Kiong
I am getting java.lang.NoClassDefFoundError: com/install4j/api/launcher/ApplicationLauncher$Callback - code chimp
@codechimp Need more details. Please state the steps to reproduce that error. - Kiong
@Kiong, Mine is a webapp running as service not JavaFX app. So the claspath of .install4j/i4jruntime.jar is not set automatically. I need to set the classpath manually. But the problem now is I don't have a launcher. So because of this may be auto updater is not triggering even if I call programatically. Is having launcher a must to have? - code chimp

1 Answers

0
votes

As of 6.0.2, the "Launch mode" setting "When first window is shown" only works with AWT/Swing windows, not with JavaFX windows. We plan to support this in a future release.

Currently, you have to use the integration wizard and add code into your application that invokes the updater. See the "Start integration wizard" button on the "Launcher integration" tab in your screen shot.


Update: This has been implemented in install4j 6.1.