1 21 22 package org.apache.derby.iapi.tools; 23 24 import java.io.IOException ; 25 import org.apache.derby.drda.NetworkServerControl; 26 import org.apache.derby.tools.dblook; 27 import org.apache.derby.tools.ij; 28 import org.apache.derby.tools.sysinfo; 29 import org.apache.derby.iapi.tools.i18n.LocalizedResource; 30 31 41 public class run { 42 43 47 static public void main(String [] args) throws IOException { 48 if (args.length < 1) { 49 printUsage(); 50 } else if (args[0].equals("ij")) { 51 ij.main(trimArgs(args)); 52 } else if (args[0].equals("sysinfo")) { 53 sysinfo.main(trimArgs(args)); 54 } else if (args[0].equals("dblook")) { 55 dblook.main(trimArgs(args)); 56 } else if (args[0].equals("server")) { 57 NetworkServerControl.main(trimArgs(args)); 58 } else printUsage(); 59 } 60 61 64 private run() { 65 } 66 67 72 private static String [] trimArgs(String [] args) 73 { 74 String [] trimmed = new String [args.length - 1]; 75 System.arraycopy(args, 1, trimmed, 0, args.length - 1); 76 return trimmed; 77 } 78 79 83 public static void printUsage() 84 { 85 LocalizedResource locRes = LocalizedResource.getInstance(); 86 System.err.println(locRes.getTextMessage("RUN_Usage")); 87 } 88 } 89 | Popular Tags |