01: package org.apache.lucene.util;
02:
03: /**
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: /**
21: * Some useful constants.
22: *
23: *
24: * @version $Id: Constants.java 564236 2007-08-09 15:21:19Z gsingers $
25: **/
26:
27: public final class Constants {
28: private Constants() {
29: } // can't construct
30:
31: /** The value of <tt>System.getProperty("java.version")<tt>. **/
32: public static final String JAVA_VERSION = System
33: .getProperty("java.version");
34: /** True iff this is Java version 1.1. */
35: public static final boolean JAVA_1_1 = JAVA_VERSION
36: .startsWith("1.1.");
37: /** True iff this is Java version 1.2. */
38: public static final boolean JAVA_1_2 = JAVA_VERSION
39: .startsWith("1.2.");
40: /** True iff this is Java version 1.3. */
41: public static final boolean JAVA_1_3 = JAVA_VERSION
42: .startsWith("1.3.");
43:
44: /** The value of <tt>System.getProperty("os.name")<tt>. **/
45: public static final String OS_NAME = System.getProperty("os.name");
46: /** True iff running on Linux. */
47: public static final boolean LINUX = OS_NAME.startsWith("Linux");
48: /** True iff running on Windows. */
49: public static final boolean WINDOWS = OS_NAME.startsWith("Windows");
50: /** True iff running on SunOS. */
51: public static final boolean SUN_OS = OS_NAME.startsWith("SunOS");
52: }
|