KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ShowHelp


1 /*
2  * FindBugs - Find bugs in Java programs
3  * Copyright (C) 2005, University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package edu.umd.cs.findbugs;
20
21 import edu.umd.cs.findbugs.gui.FindBugsFrame;
22
23 /**
24  * Show command line help.
25  *
26  * @author David Hovemeyer
27  */

28 public class ShowHelp {
29     public static void main(String JavaDoc[] args) {
30         // NOTE: this method references classes in findbugsGUI.jar.
31
// Normally, this would not be a good idea (as findbugs.jar is supposed
32
// to be standalone), but this main() method is only
33
// used from the "findbugs" script, which can safely
34
// assume that findbugsGUI.jar is available.
35

36         System.out.println("FindBugs version " + Version.RELEASE + ", " + Version.WEBSITE);
37         FindBugsFrame.showSynopsis();
38         FindBugs.showSynopsis();
39         showGeneralOptions();
40         FindBugsFrame.showCommandLineOptions();
41         FindBugs.showCommandLineOptions();
42         System.exit(0);
43     }
44
45     public static void showGeneralOptions() {
46         System.out.println("General options:");
47         System.out.println(" -gui Use the Graphical UI (default behavior)");
48         System.out.println(" -gui1 Use the older Graphical UI");
49         System.out.println(" -textui Use the Text UI");
50         System.out.println(" -jvmArgs args Pass args to JVM");
51         System.out.println(" -maxHeap size Maximum Java heap size in megabytes (default=384)");
52         System.out.println(" -javahome <dir> Specify location of JRE");
53         System.out.println(" -help Display command line options");
54         System.out.println(" -debug Enable debug tracing in FindBugs");
55     }
56 }
57
Popular Tags