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
- Dominant language
- Java
- Stars
- 165
- Forks
- 174
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 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).
Contributor guide
Assessment
This issue has not been assessed yet.