Details
Description
When an exception occurs within the GUIInstaller constructor, e.g. NoClassDefFoundError, the error is displayed at the console but no message box occurs. When the installer is started by e.g. double-clicking at the JAR file in Windows, no error message can be seen and it seems like nothing happens.
I suggest to move the current GUIInstaller constructor code into an init() subroutine and change the constructor to something like that:
public GUIInstaller() throws Throwable {
try {
init(); } // call original constructor code
catch (Throwable e) { // catch Throwables so that e.g. NoClassDefFoundError is included
try { // try to display a message box
JOptionPane.showMessageDialog (null, "Error: "+e.toString(), "Error", JOptionPane.ERROR_MESSAGE); }
catch (Exception e2) {} // ignore possible exception from showMessageDialog
throw e; }} // re-throw the original exception
A similar problem also exists in the uninstaller.
When a NoClassDefFoundError occurs in Destroyer.getListenerLists(), no error message is displayed at the GUI.
Destroyer.run() should not only catch "Exception"s, but also "Throwable"s or at least "Error"s.