*/
public static void main(String[] args) {
try {
System.setProperty("sun.awt.exception.handler", ExceptionHandler.class.getName());
final SplashScreen splash = new SplashScreen("/org/owasp/webscarab/webscarab_logo.gif");
splash.open(10000);
initLogging();
try {
Preferences.loadPreferences(null);
} catch (IOException ioe) {
System.err.println("Error loading preferences: " + ioe);
System.exit(1);
}
// Provide default Copy/Paste/etc actions on text components
Toolkit.getDefaultToolkit().getSystemEventQueue().push(new TextComponentContextMenu());
Framework framework = new Framework();
boolean lite = Boolean.valueOf(Preferences.getPreference("WebScarab.lite", "false")).booleanValue();
File t = null;
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();