Reputation: 562
I'm trying to use the updater without version check to shut down the calling launcher. I've included the following in my code to launch the updater:
ApplicationLauncher.launchApplication("368", null, false, null);
I'm getting an error when it's executing this line that it can't find the i4jparams.conf
file. It is obviously looking for the file in the same directory as the launcher, but the file is actually in the .install4j (default) subdirectory. The updater application is also in this directory.
It was working when I called the updater directly:
Process process = new ProcessBuilder(".\\.install4j\\updater.exe").start();
Unfortunately this approach does not allow the updater to shut down the calling launcher when it is busy installing a new application.
I obviously need to tell ApplicationLauncher.launchApplication
to look for the updater in the .launch4j
directory, but I'm not sure how to do this.
Upvotes: 1
Views: 405
Reputation: 562
If you want to exclude the Install4j runtime library from the GUI, here is how I did it:
Upvotes: 0
Reputation: 48070
It is obviously looking for the file in the same directory as the launcher`
No, that is not the case. The actual mechanism is that is uses the directory where the JAR file with the runtime classes is located. If you put i4jruntime.jar
into the classpath yourself, then it may use a wrong directory.
Upvotes: 1