Main inst = new Main(); inst.setVisible(true);
LookAndFeel.setLookAndFeel();  try {     Main.addStartupListener(new weka.gui.beans.StartUpListener() { public void startUpComplete() { m_MainCommandline = Main.getSingleton(); m_MainCommandline.setVisible(true); } }); Main.addStartupListener(new StartUpListener() { public void startUpComplete() { SplashWindow.disposeSplash(); } }); SplashWindow.splash(ClassLoader.getSystemResource("weka/gui/images/weka_splash.gif"));   Thread nt = new Thread() { public void run() { weka.gui.SplashWindow.invokeMethod( "weka.gui.Main", "createSingleton", new String [1]); } }; nt.start();  Thread memMonitor = new Thread() { public void run() { while(true) { try { Thread.sleep(4000); System.gc();  if (m_Memory.isOutOfMemory()) {  m_MainCommandline = null; System.gc();   m_Memory.stopThreads();   System.err.println("\ndisplayed message:"); m_Memory.showOutOfMemory(); System.err.println("\nexiting"); System.exit(-1); }  } catch(InterruptedException ex) { ex.printStackTrace(); } } } };  memMonitor.setPriority(Thread.MAX_PRIORITY); memMonitor.start(); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ex.getMessage()); }
  public static void main(String[] args) {    Main inst = new Main();    inst.setVisible(true);  }