Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.javatools.util
Class PlatformUtils

java.lang.Object
  extended by oracle.javatools.util.PlatformUtils

public class PlatformUtils
extends java.lang.Object

PlatformUtils provides a common location from which a component can identify the current platform, without the need for each component to perform its own test of the os.name or os.version properties.

Even though it is not final, this class should not be subclassed.


Field Summary
static int OS_LINUX
          Deprecated. since 11.0. Do not use this constant directly. Use isLinux()
static int OS_MAC
          Deprecated. since 11.0. Do not use this constant directly. Use isMac().
static int OS_MAC_PANTHER
          Deprecated. since 11.0. Do not use this constant directly. Use isMacPanther().
static int OS_MAC_TIGER
          Deprecated. since 11.0. Do not use this constant directly. Use isMacTiger().
static int OS_UNKNOWN
          Deprecated. since 11.0. Do not use this constant directly. Use isKnown().
static int OS_WINDOWS
          Deprecated. since 11.0. Do not use this constant directly. Use isWindows().
static int OS_WINDOWS_2K
          Deprecated. since 11.0. Do not use this constant directly. Use isWindows2K().
static int OS_WINDOWS_NT
          Deprecated. since 11.0. Do not use this constant directly. Use isWindowsNT().
static int OS_WINDOWS_XP
          Deprecated. since 11.0. Do not use this constant directly. Use isWindowsXP().
 
Method Summary
static int getPlatform()
          Deprecated. since 11.0. Use one of the static methods on this class to determine the current platform.
static boolean isAtLeastMacPanther()
          Determines whether the current platform is at least Mac OS X Panther.
static boolean isAtLeastMacTiger()
          Determines whether the current platform is at least Mac OS X Tiger.
static boolean isAtLeastWindows2K()
          Determines whether the current platform is at least Windows 2K.
static boolean isAtLeastWindows7()
          Determines whether the current platform is at least Windows 7.
static boolean isAtLeastWindowsNT()
          Called to determine whether the current platform is at least Windows NT.
static boolean isAtLeastWindowsVista()
          Determines whether the current platform is at least Windows Vista.
static boolean isAtLeastWindowsXP()
          Determines whether the current platform is at least Windows XP.
static boolean isKnown()
          Determines whether the current platform is a known platform.
static boolean isLinux()
          Determines whether the current platform is Linux.
static boolean isMac()
          Determines whether the current platform is Mac OS X.
static boolean isMacPanther()
          Determines whether the current platform is Mac OS X Panther.
static boolean isMacTiger()
          Determines whether the current platform is Mac OS X Tiger.
static boolean isWindows()
          Determines whether the current platform is Windows.
static boolean isWindows2K()
          Determines whether the current platform is Windows 2K.
static boolean isWindows7()
          Determines whether the current platform is Windows 7.
static boolean isWindowsNT()
          Determines whether the current platform is Windows NT.
static boolean isWindowsVista()
          Determines whether the current platform is Windows Vista.
static boolean isWindowsXP()
          Determines whether the current platform is Windows XP.
static java.lang.String osName()
          Returns the same as System.getProperty( "os.name" ).
static java.lang.String osVersion()
          Returns the same as System.getProperty( "os.version" ).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_UNKNOWN

public static final int OS_UNKNOWN
Deprecated. since 11.0. Do not use this constant directly. Use isKnown().
See Also:
Constant Field Values

OS_LINUX

public static final int OS_LINUX
Deprecated. since 11.0. Do not use this constant directly. Use isLinux()
See Also:
Constant Field Values

OS_MAC

public static final int OS_MAC
Deprecated. since 11.0. Do not use this constant directly. Use isMac().
See Also:
Constant Field Values

OS_MAC_PANTHER

public static final int OS_MAC_PANTHER
Deprecated. since 11.0. Do not use this constant directly. Use isMacPanther().
See Also:
Constant Field Values

OS_MAC_TIGER

public static final int OS_MAC_TIGER
Deprecated. since 11.0. Do not use this constant directly. Use isMacTiger().
See Also:
Constant Field Values

OS_WINDOWS

public static final int OS_WINDOWS
Deprecated. since 11.0. Do not use this constant directly. Use isWindows().
See Also:
Constant Field Values

OS_WINDOWS_NT

public static final int OS_WINDOWS_NT
Deprecated. since 11.0. Do not use this constant directly. Use isWindowsNT().
See Also:
Constant Field Values

OS_WINDOWS_2K

public static final int OS_WINDOWS_2K
Deprecated. since 11.0. Do not use this constant directly. Use isWindows2K().
See Also:
Constant Field Values

OS_WINDOWS_XP

public static final int OS_WINDOWS_XP
Deprecated. since 11.0. Do not use this constant directly. Use isWindowsXP().
See Also:
Constant Field Values
Method Detail

osName

public static java.lang.String osName()
Returns the same as System.getProperty( "os.name" ).

Returns:
the value of the os.name system property.

osVersion

public static java.lang.String osVersion()
Returns the same as System.getProperty( "os.version" ).

Returns:
the value of the os.version system property.

getPlatform

public static int getPlatform()
Deprecated. since 11.0. Use one of the static methods on this class to determine the current platform.

Gets a PlatformUtils identifier representing the current platform.

Returns:
int value representing the current platform.

isKnown

public static boolean isKnown()
Determines whether the current platform is a known platform.

Returns:
true if the platform is known, false otherwise.
Since:
11.0

isLinux

public static boolean isLinux()
Determines whether the current platform is Linux.

Returns:
true if Linux, false otherwise.

isMac

public static boolean isMac()
Determines whether the current platform is Mac OS X.

This method will return true regardless of which version of Mac OS X you're using. To determine whether the current platform is a specific version of Mac OS X (Panther, Tiger, etc.), please use one of the specific isMac calls below.

Returns:
true if Mac OS X, false otherwise.

isMacPanther

public static boolean isMacPanther()
Determines whether the current platform is Mac OS X Panther.

Returns:
true if Mac OS X Panther, false otherwise.

isMacTiger

public static boolean isMacTiger()
Determines whether the current platform is Mac OS X Tiger.

Returns:
true if Mac OS X Tiger, false otherwise.

isWindows

public static boolean isWindows()
Determines whether the current platform is Windows.

Note that this method will return true regardless of which version of Windows you're using. To determine whether the current platform is a specific version of Windows (XP, 2K, NT, etc.), please use one of the specific isWindows calls below.

Returns:
true if Windows, false otherwise.

isWindowsNT

public static boolean isWindowsNT()
Determines whether the current platform is Windows NT.

Returns:
true if Windows NT, false otherwise.

isWindows2K

public static boolean isWindows2K()
Determines whether the current platform is Windows 2K.

Returns:
true if Windows 2K, false otherwise.

isWindowsXP

public static boolean isWindowsXP()
Determines whether the current platform is Windows XP.

Returns:
true if Windows XP, false otherwise.

isWindowsVista

public static boolean isWindowsVista()
Determines whether the current platform is Windows Vista.

Returns:
true if Windows Vista, false otherwise.

isWindows7

public static boolean isWindows7()
Determines whether the current platform is Windows 7.

Returns:
true if Windows 7, false otherwise.

isAtLeastMacPanther

public static boolean isAtLeastMacPanther()
Determines whether the current platform is at least Mac OS X Panther.

Returns:
true if at least Mac OS X Panther, false otherwise.

isAtLeastMacTiger

public static boolean isAtLeastMacTiger()
Determines whether the current platform is at least Mac OS X Tiger.

Returns:
true if at least Mac OS X Tiger, false otherwise.

isAtLeastWindowsNT

public static boolean isAtLeastWindowsNT()
Called to determine whether the current platform is at least Windows NT.

Returns:
true if at least Windows NT, false otherwise.

isAtLeastWindows2K

public static boolean isAtLeastWindows2K()
Determines whether the current platform is at least Windows 2K.

Returns:
true if at least Windows 2K, false otherwise.

isAtLeastWindowsXP

public static boolean isAtLeastWindowsXP()
Determines whether the current platform is at least Windows XP.

Returns:
true if at least Windows XP, false otherwise.

isAtLeastWindowsVista

public static boolean isAtLeastWindowsVista()
Determines whether the current platform is at least Windows Vista.

Returns:
true if at least Windows Vista, false otherwise.

isAtLeastWindows7

public static boolean isAtLeastWindows7()
Determines whether the current platform is at least Windows 7.

Returns:
true if at least Windows 7, false otherwise.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.