Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Problem Restarting after RCP Update from Java 8 to Java 11
Problem Restarting after RCP Update from Java 8 to Java 11 [message #1834392] Mon, 09 November 2020 15:33
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

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
Previous Topic:Atomic update of artifacts and metadata in p2 repository
Next Topic:how to Add local archive and install in eclipse by commands
Goto Forum:
  


Current Time: Sat Nov 09 00:34:16 GMT 2024

Powered by FUDForum. Page generated in 0.03304 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top