I'm having an RCP application, when i copy a new plugin (say com.XXX.version) into plugins folder of my RCP product and upon launching the product this newly copied plugin gets loaded by the framework and it replaces the old one (provided the version which i copied is greater than the existing one).
when I'm trying to do the reverse process (i.e.., deleting the newly copied plugin and reverting to previous state) when RCP application is in running state (i.e.., application is in use) I'm running into problems. The issue is that the application locks these higher versioned plugin files due to which I'm unable to clean up (or uninstall) these JAR's.
Any workaround exists for accomplishing this, Suggestions will be greatly appreciated !! I want to revert back the application to previous state.
I Found an answer for my issue.
My requirement is to clean all the installed plugins and this cant be done during JVM is in running state (i mean during the RCP application is running). So i tried to delete the plugin JAR files upon JVM exit (i.e.., upon during my RCP exit) by using the method java.io.File.deleteOnExit(), which cleans the plugin upon application exit. Upon next re-launch the RCP application will have these plugins revoked and hence therefore reverts its state to previous one.