1 /* Copyright 2002-2004, 2009 Elliotte Rusty Harold
2 
3    This library is free software; you can redistribute it and/or modify
4    it under the terms of version 2.1 of the GNU Lesser General Public
5    License as published by the Free Software Foundation.
6 
7    This library is distributed in the hope that it will be useful,
8    but WITHOUT ANY WARRANTY; without even the implied warranty of
9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10    GNU Lesser General Public License for more details.
11 
12    You should have received a copy of the GNU Lesser General Public
13    License along with this library; if not, write to the
14    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
15    Boston, MA 02111-1307  USA
16 
17    You can contact Elliotte Rusty Harold by sending e-mail to
18    elharo@ibiblio.org. Please include the word "XOM" in the
19    subject line. The XOM home page is located at http://www.xom.nu/
20 */
21 
22 package nu.xom;
23 
24 import java.io.BufferedReader;
25 import java.io.InputStream;
26 import java.io.InputStreamReader;
27 
28 /**
29  * <p>
30  * A simple class used to make the JAR archive do something sensible
31  * when a user tries <samp>java -jar xom.jar</samp>.
32  * </p>
33  *
34  * @author Elliotte Rusty Harold
35  * @version 1.2.4
36  *
37  */
38 class Info {
39 
40 
main(String[] args)41     public static void main(String[] args) {
42 
43         String version = "1.2.4 or later";
44         try {
45             InputStream stream = ClassLoader.getSystemResourceAsStream("nu/xom/version.txt");
46             BufferedReader in = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
47             version = in.readLine();
48         } catch (Exception ex) {
49             version = "1.2.4b1 or later";
50         }
51 
52         System.out.println("This is XOM " + version + ", a new XML Object Model.");
53         System.out.println("Copyright 2002-2009 Elliotte Rusty Harold");
54         System.out.println("http://www.xom.nu/");
55         System.out.println();
56         System.out.println("XOM is a class library intended to be used with other programs.");
57         System.out.println("By itself, it doesn't really do anything.");
58         System.out.println("For more information see http://www.xom.nu/");
59         System.out.println();
60         System.out.println("This library is free software; you can redistribute it and/or modify it");
61         System.out.println("under the terms of version 2.1 of the GNU Lesser General Public License");
62         System.out.println("as published by the Free Software Foundation.");
63         System.out.println();
64         System.out.println("This library is distributed in the hope that it will be useful,");
65         System.out.println("but WITHOUT ANY WARRANTY; without even the implied warranty of");
66         System.out.println("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ");
67         System.out.println("See the GNU Lesser General Public License for more details.");
68         System.out.println();
69         System.out.println("You should have received a copy of the GNU Lesser General");
70         System.out.println("Public License along with this library; if not, write to the");
71         System.out.println();
72         System.out.println("Free Software Foundation, Inc.");
73         System.out.println("59 Temple Place");
74         System.out.println("Suite 330,");
75         System.out.println("Boston, MA  02111-1307");
76         System.out.println("USA");
77 
78     }
79 
80 
81 }
82