Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312831

Summary: Restart after update of launcher can fail
Product: [Eclipse Project] Equinox Reporter: Andrew Niefer <aniefer>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: irbull, Olivier_Thomann, susan
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Andrew Niefer CLA 2010-05-13 14:49:07 EDT
If you are running with the vm in a seperate process (-vm java.exe) instead of in-process with JNI, then we will fail to restart after a p2 update if the launcher.jar was updated to a new version and the old jar has already been removed.

This is because in this situation (vm in separate process from the eclipse exe), the .ini file is not re-read for the restart.  

The launcher supports 2 restart codes:
23: "restart" with the same command
24: "relaunch" with a different command

Historically, "restart" just restarts the java process with the same command and without re-reading the launcher.ini.  With the advent of JNI launcher, we actually need to shutdown the eclipse process itself, so the restart does re-read the launcher.ini in that case.

We are currently using Workbench.restart(), which I believe is a "restart" with exit code 23.

One possibility would be to do a "relaunch" and modify the command line, see org.eclipse.ui.ide/OpenWorkspaceAction#restart for an example of this.
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:06:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 2 Eclipse Genie CLA 2021-09-03 03:15:54 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.