public class HostProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AIX |
static int |
DIGITAL_UNIX |
static int |
FREEBSD |
static int |
HP_UX |
static int |
IRIX |
static int |
LINUX |
static int |
MAC_OS |
static int |
MAC_OSX |
static int |
MPE_IX |
static int |
NETWARE |
static int |
OS_2 |
static int |
PLATFORM_LINUX |
static int |
PLATFORM_MACOS |
static int |
PLATFORM_MACOSX |
static int |
PLATFORM_NETWARE |
static int |
PLATFORM_OS2 |
static int |
PLATFORM_UNIX |
static int |
PLATFORM_UNKNOWN |
static int |
PLATFORM_WINDOWS |
static int |
SOLARIS |
static int |
UNKNOWN |
static int |
WINDOWS_10 |
static int |
WINDOWS_2k |
static int |
WINDOWS_7 |
static int |
WINDOWS_8 |
static int |
WINDOWS_95 |
static int |
WINDOWS_98 |
static int |
WINDOWS_NT |
static int |
WINDOWS_VISTA |
static int |
WINDOWS_XP |
Constructor and Description |
---|
HostProperties()
Initialize the host properties.
|
HostProperties(java.lang.String vendor,
java.lang.String app)
Initialize host properties with specific relative application dir
If home !
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAppBundledResourcesDir()
Get application resources dir.
|
static java.lang.String |
getAppLicensesDir()
Default directories on several systems by platform.
|
static java.lang.String |
getAppLogDir()
Default directories on several systems by platform.
|
static java.lang.String |
getAppPreferencesDir()
Default directories on several systems by platform.
|
static java.lang.String |
getAppPreferencesName()
The Preferences file name (only!
|
static java.lang.String |
getAppSupportDir()
Default directories on several systems by platform.
|
static java.lang.String |
getAppTmpDir()
Default directories on several systems by platform.
|
static java.lang.String |
getBootVolumeName()
Retrieve the boot volume name.
|
static java.lang.String |
getCurrentDir()
Current Directory
|
static java.lang.String |
getDirSep()
Retrieve the directory separation character string.
|
static int |
getHostOS()
Retrieve the OS we're running ongeneral platform we are running on.
|
static int |
getHostPlatform()
Retrieve general platform we are running on.
|
static java.lang.String |
getHostProperty(java.lang.String name,
java.lang.String dflt)
generic Property retrieval function
|
static java.lang.String |
getJarLocation()
Returns the location of the JAR file
|
static int |
getJREversion()
Returns the JRE-version (as an int) that executes this program
(we take only the first three tokens of the version-string into account).
|
static java.lang.String |
getLineSep()
Retrieve the line separation character string.
|
static java.lang.String |
getPathSep()
Retrieve the path separation character string.
|
static java.lang.String |
getPreferencesDir()
Default directories on several systems by platform.
|
static java.lang.String |
getSupportDir()
Default directories on several systems by platform.
|
static java.lang.String |
getUserHomeDir()
Home directory
|
static void |
logStatus()
Writes current properties to the log
|
public static final int PLATFORM_UNKNOWN
public static final int PLATFORM_WINDOWS
public static final int PLATFORM_MACOS
public static final int PLATFORM_MACOSX
public static final int PLATFORM_LINUX
public static final int PLATFORM_UNIX
public static final int PLATFORM_OS2
public static final int PLATFORM_NETWARE
public static final int UNKNOWN
public static final int WINDOWS_95
public static final int WINDOWS_98
public static final int WINDOWS_2k
public static final int WINDOWS_XP
public static final int MAC_OS
public static final int MAC_OSX
public static final int LINUX
public static final int SOLARIS
public static final int OS_2
public static final int MPE_IX
public static final int HP_UX
public static final int AIX
public static final int FREEBSD
public static final int IRIX
public static final int DIGITAL_UNIX
public static final int NETWARE
public static final int WINDOWS_NT
public static final int WINDOWS_VISTA
public static final int WINDOWS_7
public static final int WINDOWS_8
public static final int WINDOWS_10
public HostProperties()
public HostProperties(java.lang.String vendor, java.lang.String app)
If home != null, this will be returned as the User's home directory.
public static java.lang.String getBootVolumeName()
public static int getHostPlatform()
public static int getHostOS()
public static java.lang.String getLineSep()
public static java.lang.String getDirSep()
public static java.lang.String getPathSep()
public static java.lang.String getHostProperty(java.lang.String name, java.lang.String dflt)
public static java.lang.String getUserHomeDir()
public static java.lang.String getCurrentDir()
public static java.lang.String getPreferencesDir()
public static java.lang.String getJarLocation()
public static java.lang.String getSupportDir()
public static java.lang.String getAppPreferencesDir()
public static java.lang.String getAppPreferencesName()
public static java.lang.String getAppSupportDir()
public static java.lang.String getAppLogDir()
public static java.lang.String getAppTmpDir()
public static java.lang.String getAppBundledResourcesDir()
public static java.lang.String getAppLicensesDir()
public static void logStatus()
public static int getJREversion()