KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Made > CodeGen > Main


1 /* $Id: Main.java,v 1.1.1.1 2003/02/11 16:19:41 bures Exp $ */
2 package SOFA.SOFAnode.Made.CodeGen;
3
4 /** Main class of code generator run from command line.
5   *
6   * @author Petr Hnetynka
7   */

8 public class Main {
9   public static void main(String JavaDoc[] argv) {
10     try {
11       System.setSecurityManager(new java.rmi.RMISecurityManager JavaDoc());
12
13       Output.setOut(new SOFA.SOFAnode.Made.ConsoleLogger());
14       if (argv.length == 0) {
15         Output.out.println(Res.res.getString("MSG_Error")+": "+Res.res.getString("MSG_NoArg"));
16       }
17       
18       Generator gen = new Generator(argv);
19       gen.generate();
20       Output.out.println(Res.res.getString("MSG_End"));
21       
22     } catch (Exception JavaDoc e) {
23       System.out.println(e.getMessage());
24       e.printStackTrace();
25     } catch (Error JavaDoc e) {
26       System.out.println(e.getMessage());
27       e.printStackTrace();
28     }
29   }
30 }
31
Popular Tags