eclipse-platform / eclipse-platform/eclipse.platform

When a plugin with a setJvm action in its uninstall phase is uninstalled, the -vm parameter in the _eclipse.ini_ file is not updated

Offen
#74 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
165
Forks
174
Ø Merge
2 T. 8 Std.
Gemergte PRs (30 T.)
22

Beschreibung

When a plugin with a _setJvm_ action defined in its uninstall phase is uninstalled, the _-vm_ parameter in the _eclipse.ini_ file is not updated until some other plugin is installed. That can be observed by uninstalling the embedded _JRE_, whose _p2.inf_ file contains this:

```
instructions.uninstall = \
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);
```

Until the time when another plugin is installed, Eclipse will keep using the same embedded _JRE_ and the _-vm_ parameter will stay in the _eclipse.ini_ file. It is easily reproducible:

1. Install an eclipse form scratch (by unzipping _eclipse-java-2022-03-R-win32-x86_64.zip_)
2. Uninstall the embedded _JRE_ (_org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.2.v20220201-1208_).
3. After restarting Eclipse, the _-vm_ parameter has not changed and still has the default value: (..._plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.2.v20220201-1208/jre/bin\server\jvm.dll_). Using process monitor, you can see that the _eclipse.exe_ executable is still using that _dll_.
4. No matter how many times Eclipse is restarted, the -vm parameter stays there.
5. If any other plugin is installed, the _-vm_ parameter finally disappears from the _eclipse.ini_ file. The parameter disappears when the installation of that other plugin finishes (no need to restart Eclipse for it to disappear).

_Note_: uninstalling other plugins does not make the _-vm_ parameter disappear. It is only when an other plugin is installed that it disappears.

Observed on: _Eclipse 2022_03 (4.23), Windows 10._

This bug may be related to [550091](https://bugs.eclipse.org/bugs/show_bug.cgi?id=550091) or [551378](https://bugs.eclipse.org/bugs/show_bug.cgi?id=551378).

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere die Deinstallationssequenz mit dem eingebetteten JRE und untersuche die setJvm-Aktion zur Deinstallation in der p2.inf-Datei zusammen mit der eclipse.ini-Datei. Verfolge, wann der -vm-Parameter während der Deinstallation des Plugins im Vergleich zu einer späteren Installation neu geschrieben wird. Erledigt ist die Aufgabe, wenn die Deinstallation des eingebetteten JRE -vm sofort aktualisiert oder entfernt, ohne dass eine weitere Plugin-Installation erforderlich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.