Problem Restarting after RCP Update from Java 8 to Java 11 [message #1834392] |
Mon, 09 November 2020 15:33 |
|
Hi, Forum,
I have an e4 RCP app (JavaFX via efxclipse) with p2-based self-update capability in the usual Eclipse Platform fashion. The current production release of this app runs on a Java 8 VM. Now I need to publish a release that requires Java 11, but I have a problem in the update process.
The update itself seems to work okay; it's the restart step where I have a problem. When the app prompts to restart to complete the update, it closes but does not restart. Launching the app again, it seems to work fine, running the new bundle versions on the Java 11 VM.
Looking into this, it seems that the exit code 23 that signals the Eclipse Launcher to start the app again using the same command-line as previously, but that command-line specifies the Java 8 VM. That won't work for the new bundle versions that now require Java 11. So, I think what is happening is that the re-start runs the Java 8 VM and it crashes, but without any external indication: neither an error dialog nor any logs that I can find.
The launcher documentation indicates that an exit code 24 can be used to specify a new command-line, so in theory it would be possible for the app to know that the update installed a new Java VM and to create a new command-line on that basis. But, of course, the current release of my app that's out there in the wild would have to be updated to do this, before I can publish the update that I really want to publish.
Is there anything else that I can do to work around this? Did I miss something in my previous release that would have made this easier? How do other applications deal with this kind of JVM requirement update? Or do we just have to accept that the restart won't happen and the user has to re-launch the app, themselves?
My application bundles its own VM. The update doesn't remove the Java 8 VM but just adds the Java 11 VM. If it were to remove the old VM, could that help? Would the launcher look in the ini file or something else to find the new VM?
The previous released version of my app is based on
- Eclipse Platform 4.9 (2018-09)
- e(fx)clipse 3.6
- OpenJDK Java 8 with JavaFX 8
The new version is based on
- Eclipse Platform 4.14 (2019-12)
- e(fx)clipse 3.7
- OpenJDK Java 11
- OpenJFX JavaFX 14
Thanks,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.07270 seconds