KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > utils > Constants


1 package org.enhydra.snapper.utils;
2
3 /**
4  * Copyright 2004 The Apache Software Foundation
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 /**
20  * Some useful constants.
21  *
22  * @author Doug Cutting
23  * @version $Id: Constants.java,v 1.1 2005/04/26 15:06:46 igor Exp $
24  **/

25
26 public final class Constants {
27   private Constants() {} // can't construct
28

29   /** The value of <tt>System.getProperty("java.version")<tt>. **/
30   public static final String JavaDoc JAVA_VERSION = System.getProperty("java.version");
31   /** True iff this is Java version 1.1. */
32   public static final boolean JAVA_1_1 = JAVA_VERSION.startsWith("1.1.");
33   /** True iff this is Java version 1.2. */
34   public static final boolean JAVA_1_2 = JAVA_VERSION.startsWith("1.2.");
35   /** True iff this is Java version 1.3. */
36   public static final boolean JAVA_1_3 = JAVA_VERSION.startsWith("1.3.");
37  
38   /** The value of <tt>System.getProperty("os.name")<tt>. **/
39   public static final String JavaDoc OS_NAME = System.getProperty("os.name");
40   /** True iff running on Linux. */
41   public static final boolean LINUX = OS_NAME.startsWith("Linux");
42   /** True iff running on Windows. */
43   public static final boolean WINDOWS = OS_NAME.startsWith("Windows");
44   /** True iff running on SunOS. */
45   public static final boolean SUN_OS = OS_NAME.startsWith("SunOS");
46 }
47
Popular Tags