Statistics
| Revision:

root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / installer / Installer.java @ 15280

History | View | Annotate | Download (1.93 KB)

1
/*
2
 *  $Id: Installer.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
3
 *  IzPack
4
 *  Copyright (C) 2001-2003 Jonathan Halliday, Julien Ponge
5
 *
6
 *  File :               Installer.java
7
 *  Description :        Entry point, selects between GUI and headless modes.
8
 *  Author's email :     jonathan.halliday@arjuna.com
9
 *  Author's Website :   http://www.arjuna.com
10
 *
11
 *  This program is free software; you can redistribute it and/or
12
 *  modify it under the terms of the GNU General Public License
13
 *  as published by the Free Software Foundation; either version 2
14
 *  of the License, or any later version.
15
 *
16
 *  This program is distributed in the hope that it will be useful,
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 *  GNU General Public License for more details.
20
 *
21
 *  You should have received a copy of the GNU General Public License
22
 *  along with this program; if not, write to the Free Software
23
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
 */
25
package com.izforge.izpack.installer;
26

    
27
/**
28
 *  The program entry point. Selects between GUI and text
29
 *  install modes.
30
 *
31
 * @author Jonathan Halliday
32
 */
33
public class Installer
34
{
35
  /**
36
   *  The main method (program entry point).
37
   *
38
   * @param  args  The arguments passed on the command-line.
39
   */
40
  public static void main(String[] args)
41
  {
42
    try
43
    {
44
      if(args.length == 0) {
45
        // can't load the GUIInstaller class on headless machines,
46
        // so we use Class.forName to force lazy loading. 
47
        Class.forName("com.izforge.izpack.installer.GUIInstaller").newInstance();
48
      } else {
49
        new AutomatedInstaller(args[0]);
50
      }
51
    }
52
    catch (Exception e)
53
    {
54
      System.err.println("- Error -");
55
      System.err.println(e.toString());
56
      e.printStackTrace();
57
      System.exit(0);
58
    }
59
  }
60
}