X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=9a854711ad0ce1597c5ef4a6432812b50c51b4d9;hb=a6cd54c46366acd8bc3350a79374b18f9eb0b240;hp=ff2d06a86de195fa66503178e20552954bec0f0b;hpb=a109b496d2e0793d041fde50d1d3b50d3a58d271;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index ff2d06a..9a85471 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -37,33 +37,6 @@ import java.util.Vector; */ public class Jalview { - /** - * Initialises the Apache Axis logger - */ - private static void initLogger() - { - Logger laxis = Logger.getLogger("org.apache.axis"); - Logger lcastor = Logger.getLogger("org.exolab.castor"); - - if (Cache.getProperty("logs.Axis.Level") == null) - { - Cache.setProperty("logs.Axis.Level", Level.INFO.toString()); - } - - if (Cache.getProperty("logs.Castor.Level") == null) - { - Cache.setProperty("logs.Castor.Level", Level.INFO.toString()); - } - - laxis.setLevel(Level.toLevel(Cache.getProperty("logs.Axis.Level"))); - lcastor.setLevel(Level.toLevel(Cache.getProperty("logs.Castor.Level"))); - - ConsoleAppender ap = new ConsoleAppender(new SimpleLayout(), - "System.err"); - ap.setName("JalviewLogger"); - laxis.addAppender(ap); - lcastor.addAppender(ap); - } /** * main class for Jalview application @@ -115,17 +88,20 @@ public class Jalview headless = true; } - Cache.loadProperties(aparser.getValue("props")); - - try - { - initLogger(); - } - catch (Exception e) - { - System.err.println("Problems initializing the log4j system\n"); - } + try + { + Cache.initLogger(); + } + catch (java.lang.NoClassDefFoundError error) + { + error.printStackTrace(); + System.out.println( + "\nEssential logging libraries not found." + +"\nUse: java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview"); + System.exit(0); + } + Cache.loadProperties(aparser.getValue("props")); Desktop desktop = null; if( !headless ) @@ -133,7 +109,13 @@ public class Jalview try { UIManager.setLookAndFeel( - UIManager.getSystemLookAndFeelClassName() + UIManager.getSystemLookAndFeelClassName() + // UIManager.getCrossPlatformLookAndFeelClassName() +//"com.sun.java.swing.plaf.gtk.GTKLookAndFeel" +//"javax.swing.plaf.metal.MetalLookAndFeel" +//"com.sun.java.swing.plaf.windows.WindowsLookAndFeel" +//"com.sun.java.swing.plaf.motif.MotifLookAndFeel" + ); } catch (Exception ex) @@ -142,6 +124,7 @@ public class Jalview desktop = new Desktop(); desktop.setVisible(true); + desktop.discoverer.start(); } @@ -235,11 +218,11 @@ public class Jalview ////////////////////// if ( !headless && - jalview.bin.Cache.getProperty("SHOW_STARTUP_FILE").equals("true") && - jalview.bin.Cache.getProperty("STARTUP_FILE") != null) + jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)) { - file = jalview.bin.Cache.getProperty("STARTUP_FILE"); + file = jalview.bin.Cache.getDefault("STARTUP_FILE", + "http://www.jalview.org/examples/exampleFile.jar"); protocol = "File"; if (file.indexOf("http:") > -1)