4 |
|
//---IMPORTS--- |
5 |
|
import java.util.*; |
6 |
|
import java.io.*; |
7 |
+ |
import uk.ac.ukc.iscream.util.*; |
8 |
|
|
9 |
|
/** |
10 |
|
* The component manager is the starting point for all |
47 |
|
* @param args the command line arguments |
48 |
|
*/ |
49 |
|
public static void main(String[] args) { |
50 |
< |
System.out.println("--- I-Scream System Component Manager ---"); |
50 |
> |
System.out.println("--- i-scream Server Component Manager ---"); |
51 |
|
System.out.println("--- Starting System ---"); |
52 |
|
|
53 |
|
// get the command line args |
53 |
– |
// this is a bit messy and should be looked at |
54 |
|
String defaultProperties = DEFAULTPROPERTIES; |
55 |
|
String filterName = null; |
56 |
< |
if (args.length > 0) { |
57 |
< |
if (args[0].equals("-l")) { |
58 |
< |
defaultProperties = args[1]; |
59 |
< |
} else if (args[0].equals("-f")) { |
60 |
< |
filterName = args[1]; |
61 |
< |
} else if (args[2].equals("-l")) { |
62 |
< |
filterName = args[3]; |
63 |
< |
} else if (args[2].equals("-f")) { |
64 |
< |
filterName = args[3]; |
65 |
< |
} else { |
56 |
> |
for(int i=0; i < args.length; i++) { |
57 |
> |
if(args[i].equals("-h")) { |
58 |
|
usage(); |
59 |
< |
} |
59 |
> |
} |
60 |
> |
else if(args[i].equals("-f")) { |
61 |
> |
i++; filterName = args[i]; |
62 |
> |
} |
63 |
> |
else if(args[i].equals("-l")) { |
64 |
> |
i++; defaultProperties = args[i]; |
65 |
> |
} |
66 |
> |
else { |
67 |
> |
usage(); |
68 |
> |
} |
69 |
|
} |
70 |
|
|
71 |
|
// load the default properties file into the system properties |