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
- Langage dominant
- Java
- Étoiles
- 165
- Forks
- 174
- Merge moyen
- 2 j 8 h
- PR mergées (30 j)
- 22
Description
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).
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez la séquence de désinstallation avec le JRE intégré et examinez l’action setJvm de désinstallation dans le fichier p2.inf ainsi que le fichier eclipse.ini. Suivez le moment où le paramètre -vm est réécrit lors de la désinstallation du plugin par rapport à une installation ultérieure. La tâche est terminée lorsque la désinstallation du JRE intégré met immédiatement à jour ou supprime -vm, sans nécessiter une autre installation du plugin.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100