@david_benn All those approaches are good. I think I will start from the simplest, then try to implement more sophisticated.
@david_benn, Well, the thought about stand-alone updater also came into my mind yet it's quite an ugly solution. I'll play with the code when I have time, probably will find a solution and let you know.
How I see the situation: 1. ClassLoader (PluginLoader.java, loadClass method) loads only the main plugin’s class, for example, for ASAS plugin, “ASASObservationSource.class”. If we close the class loader immediately after loading this class, nested “ASASObservationSource$ASASFileReader.class” will not be loaded and we will get an exception. 2. If we close class loader after calling newInstance, other exceptions might be thrown when plugin be in use, because in our example classes “ASASObservationSource$1.class”...
How I see the situation: 1. ClassLoader (PluginLoader.java, loadClass method) loads only the main plugin’s class, for example, for ASAS plugin, “ASASObservationSource.class”. If we close the class loader immediately after loading this class, nested “ASASObservationSource$ASASFileReader.class” will not be loaded and we will get an exception. 2. If we close class loader after calling newInstance, other exceptions might be thrown when plugin be in use, because in our example classes “ASASObservationSource$1.class”...
How I see the situation: 1. ClassLoader (PluginLoader.java, loadClass method) loads only the main plugin’s class, for example, for ASAS plugin, “ASASObservationSource.class”. If we close the class loader immediately after loading this class, nested “ASASObservationSource$ASASFileReader.class” will not be loaded and we will get an exception. 2. If we close class loader after calling newInstance, other exceptions might be thrown when plugin be in use, because in our example classes “ASASObservationSource$1.class”...
The situation is more complex. URLClassLoader cannot be simply closed in PluginLoader. It is needed while program run to load nested classes. This was not obvious when VStar run under Eclipse.
The situation is more complex. URLClassLoader cannot be simply closed in PluginLoader. It is needed while program run to load nested classes.
Some strange errors occured when program compiled with my fixes: yesterday I did not see them. Additional investigation is needed.