if (args != null && args.length == 1) {
t = new File(args[0]);
}
final File session = t;
final WebScarabUI ui;
if (! lite) {
UIFramework uif = new UIFramework(framework);
loadAllPlugins(framework, uif);
ui = uif;
} else {
Lite uif = new Lite(framework);
loadLitePlugins(framework, uif);
ui = uif;
}
try {
ExceptionHandler.setParentComponent(ui.getFrame());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
JFrame frame = ui.getFrame();
frame.setVisible(true);
frame.toFront();
frame.requestFocus();
splash.close();
if (session != null && session.isDirectory())
ui.loadSession(session);
else
ui.createTemporarySession();
}
});
ui.run();
} catch (Exception e) {
System.err.println("Error loading GUI: " + e.getMessage());
e.printStackTrace();
System.exit(1);
}