m_explorer.m_PreprocessPanel.setInstancesFromFile(ConverterUtils.getLoaderForFile(args[0]));
AbstractFileLoader loader = ConverterUtils.getLoaderForFile(args[0]); loader.setFile(new File(args[0])); m_explorer.m_PreprocessPanel.setInstancesFromFile(loader);
  public static void main(String [] args) {    LookAndFeel.setLookAndFeel();        try {      // uncomment to disable the memory management:      //m_Memory.setEnabled(false);      m_explorer = new Explorer();      final JFrame jf = new JFrame("Weka Explorer");      jf.getContentPane().setLayout(new BorderLayout());      jf.getContentPane().add(m_explorer, BorderLayout.CENTER);      jf.addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) {          jf.dispose();          System.exit(0);        }      });      jf.pack();      jf.setSize(800, 600);      jf.setVisible(true);      Image icon = Toolkit.getDefaultToolkit().      getImage(ClassLoader.getSystemResource("weka/gui/weka_icon.gif"));      jf.setIconImage(icon);      if (args.length == 1) {        System.err.println("Loading instances from " + args[0]);        m_explorer.m_PreprocessPanel.setInstancesFromFile(ConverterUtils.getLoaderForFile(args[0]));      }      Thread memMonitor = new Thread() {        public void run() {          while(true) {            try {              //System.out.println("Before sleeping.");              this.sleep(4000);              System.gc();              if (m_Memory.isOutOfMemory()) {                // clean up                jf.dispose();                m_explorer = null;                System.gc();                // stop threads                m_Memory.stopThreads();                // display error                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());    }  }