Main routine for GATE. Command-line arguments: -h display a short help message -d URL define URL to be a location for CREOLE resoures -i file additional initialisation file (probably called gate.xml ). Used for site-wide initialisation by the star
(String[] args)
| 79 | * </UL> |
| 80 | */ |
| 81 | public static void main(String[] args) throws GateException { |
| 82 | |
| 83 | // check we have a useable JDK |
| 84 | if( |
| 85 | System.getProperty("java.version").compareTo(Gate.getMinJdkVersion()) |
| 86 | < 0 |
| 87 | ) { |
| 88 | throw new GateException( |
| 89 | "GATE requires JDK " + Gate.getMinJdkVersion() + " or newer" |
| 90 | ); |
| 91 | } |
| 92 | |
| 93 | ThreadWarningSystem tws = new ThreadWarningSystem(); |
| 94 | tws.addListener(new ThreadWarningSystem.Listener() { |
| 95 | |
| 96 | final PrintStream out = System.out; |
| 97 | |
| 98 | @Override |
| 99 | public void deadlockDetected(ThreadInfo inf) { |
| 100 | out.println("Deadlocked Thread:"); |
| 101 | out.println("------------------"); |
| 102 | out.println(inf); |
| 103 | for (StackTraceElement ste : inf.getStackTrace()) { |
| 104 | out.println("\t" + ste); |
| 105 | } |
| 106 | } |
| 107 | @Override |
| 108 | public void thresholdExceeded(ThreadInfo[] threads) { } |
| 109 | }); |
| 110 | |
| 111 | // process command-line options |
| 112 | processArgs(args); |
| 113 | |
| 114 | runGui(); |
| 115 | } // main |
| 116 | |
| 117 | /** Register any CREOLE URLs that we got on the command line */ |
| 118 | protected static void registerCreoleUrls() { |
nothing calls this directly
no test coverage detected