View Javadoc

1   /*
2    * JarInspector - Copyright (C) 2004 Che Inc., Rosario Argentina
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Library General Public
6    * License as published by the Free Software Foundation; either
7    * version 2 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Library General Public License for more details.
13   *
14   * You should have received a copy of the GNU Library General Public
15   * License along with this library; if not, write to the Free
16   * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17   */
18  
19  package inc.che.jarinspector;
20  
21  // Imports
22  
23  import inc.che.common.audio.AudioPlayer;
24  import inc.che.common.config.Config;
25  import inc.che.common.resource.ResourceManager;
26  
27  import java.util.Locale;
28  
29  import org.apache.log4j.Logger;
30  
31  /***
32   *  <b>Mainclass for Che Inc. JarInspector</b>
33   * @version $Id: JarInspector.java,v 1.1 2005/03/06 12:56:57 stevemcmee Exp $
34   * @author <address> Steve McMee &lt;stevemcmee@sourceforge.net&gt; </address>
35   */
36  
37  public final class JarInspector {
38  
39      /*** CVS ID of this file */
40      public static final String CVS_ID =
41          "$Id: JarInspector.java,v 1.1 2005/03/06 12:56:57 stevemcmee Exp $";
42  
43      /*** logger instance for this class */
44  
45      private static Logger log = Logger.getLogger(JarInspector.class);
46  
47      /***
48       * configuration instance for this class
49       */
50      private static Config config = Config.getInstance();
51  
52      /***
53       * The ResourceManager
54       */
55      private static ResourceManager resourceManager =
56          ResourceManager.getResourceManager(StringResources.TEXT_RESOURCES);
57  
58      /***
59       * forbidden Constructor
60       */
61      private JarInspector() {
62      }
63      /***
64       * Main-method to start the application
65       *@param args commandline arguments
66       */
67      public static void main(String[] args) throws Exception {
68          log.debug("Lets Go :-)");
69          resourceManager.setLocale(
70              config.getLocaleParameter("locale", Locale.GERMAN));
71  
72          JarInspectorFrame frame = new JarInspectorFrame();
73  
74          if (config.getBooleanParameter("sound.play", true)) {
75              try {
76  
77                  AudioPlayer.play(
78                      JarInspector.class.getClassLoader().getResourceAsStream(
79                          "inc/che/jarinspector/resource/wav/intro.wav"));
80              } catch (Exception ex) {
81                  ex.printStackTrace();
82                  log.error(ex);
83              }
84          }
85  
86          frame.show();
87      }
88  }