1 19 package org.netbeans.mdrshell; 20 21 import java.io.FileInputStream ; 22 import java.io.FileNotFoundException ; 23 import java.io.InputStream ; 24 25 import java.util.Collection ; 26 import java.util.ArrayList ; 27 import java.util.Iterator ; 28 29 import org.netbeans.api.mdr.*; 30 import org.openide.util.*; 31 32 import org.netbeans.mdr.NBMDRepositoryImpl; 33 import org.netbeans.mdr.util.*; 34 35 import javax.jmi.model.ModelPackage; 36 import javax.jmi.model.Import; 37 import javax.jmi.model.ImportClass; 38 import javax.jmi.model.ModelElement; 39 import javax.jmi.reflect.*; 40 import org.netbeans.mdr.persistence.memoryimpl.StorageFactoryImpl; 41 import org.openide.ErrorManager; 42 43 public class Main extends Object { 44 45 48 public static String [] STANDARD_LIBS = new String [] { "resources/start.ms", "resources/ext.ms" }; 49 50 63 public static void main( String [] args ) throws FileNotFoundException { 64 try { 65 66 InputStream [] iss = new InputStream [STANDARD_LIBS.length+args.length+1]; 67 68 69 for ( int i=0; i<STANDARD_LIBS.length; i++ ) { 70 iss[i] = Main.class.getResourceAsStream(STANDARD_LIBS[i]); 71 } 72 73 for ( int i=0; i<args.length; i++ ) { 74 iss[STANDARD_LIBS.length+i] = new FileInputStream (args[i]); 75 } 76 77 iss[STANDARD_LIBS.length+args.length] = System.in; 78 79 81 new Shell().run( iss ); 82 MDRManager.getDefault().shutdownAll(); 83 } catch (RuntimeException e) { 84 ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, e); 85 } 87 } 88 } 89 | Popular Tags |