Some of you might be like me and wonder if there is a way to delete all the old Java JDK/VMs once IBM releases a new patch with a new JDK.
Here are some steps for removing those extra JDKs.
Now, one method is to just delete the extra JDK folders and plugins manually.
This will probably work fine for most people. I was concerned that deleting the plugins could cause other side effects from within RDI/Eclipse so I investigated what it would take for Eclipse to remove references.
That is when I found the P2 Garbage Collector.
I've found that when the java is added as a Plugin we get the best outcome.
When the new JDK plugin is applied we can then run the P2 Garbage collection and P2 will automatically remove the old unused JDK plugin for us.
It will not delete the JDK folders that were uncompressed in the base RDI/Eclipse folder. Those still need to be removed manually, but at least we are more confident that Eclipse won't be trying to use them.
How to run the P2 Garbage Collector.
Since RDI 9.8 removed the eclipse console executable you must now use RDI.EXE and specify the VM when attempting to access the garbage collector application.
The folder that contains my RDi.EXE is "C:\IBM\RDI9.8\IBM Rational Developer for I". This is for reference when building your own commands with the full paths.
You will need to know the java plugin folder.
Here is the command for RDI 9.8.0.3:
"C:\IBM\RDI9.8\IBM Rational Developer for i\RDi.exe" -vm "C:\IBM\RDI9.8\IBM Rational Developer for i\plugins\com.ibm.semeru.certified.jdk.x64.windows_9.8.3.202407110822\jdk\bin\server\jvm.dll" -application org.eclipse.equinox.p2.garbagecollector.application -profile profile
The -application is the name of the P2 garbage collector.
The -profile value used is "profile". It was found in [C:\IBM\RDI9.8\IBM Rational Developer for i\configuration\config.ini]. Shown as: "eclipse.p2.profile=profile"
With RDI 9.8.0.3 IBM used the Plugin method for the JVM. So the java is within the "plugins" folder.
With RDI 9.8.0.2 IBM used a method that uncompresses another JVM folder to the RDI root folder.
For 9.8.0.2 use this for -vm "C:\IBM\RDI9.8\IBM Rational Developer for i\jdk-11.0.22+7\bin\server\jvm.dll"
For 9.8.0.1 use -vm "C:\IBM\RDI9.8\IBM Rational Developer for i\jdk-11.0.20.1+1\bin\server\jvm.dll"
For 9.8.0.0 use -vm "C:\IBM\ RDI9.8\IBM Rational Developer for i\jdk\bin\server\jvm.dll"
Once the garbage collector is done the Java plugins should all be gone.
You can then delete the java folders under RDI. For example "jdk", "jdk-11.0.20.1+1", "jdk-11.0.22+7".
The garbage collector will also remove the "replaced" versions of the RDI plugins. So don't have plugins from prior version of RDI muddling up the plugins folder.
--
Chris Hiebert
Lead Software Developer
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.