Package com.luciad.util
Class TLcdSystemPropertiesUtil
java.lang.Object
com.luciad.util.TLcdSystemPropertiesUtil
This class provides a set of utility methods to access
System
properties.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum of the recognized java versions. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isJava10()
Deprecated.static boolean
isJava11()
Deprecated.useisJavaVersion(JavaVersion)
insteadstatic boolean
isJava8()
Deprecated.The minimum JDK requirement is higher than or equal to 1.8, so this method will always return true.static boolean
isJava9()
Deprecated.useisJavaVersion(JavaVersion)
insteadstatic boolean
isJavaVersion
(TLcdSystemPropertiesUtil.JavaVersion aJavaVersion) Check if the Virtual Machine is running with the provided Java version or higher.static boolean
isLinux()
Returns true if the Virtual Machine is running on a Linux operating system, false otherwisestatic boolean
isMacOS()
Returns true if the Virtual Machine is running on a Mac operating system, false otherwisestatic boolean
Returns true if the Virtual Machine is running on a Windows operating system, false otherwisestatic void
printSystemProperties
(PrintStream aPrintStream) Prints all the system properties to the given PrintStream.
-
Constructor Details
-
TLcdSystemPropertiesUtil
public TLcdSystemPropertiesUtil()
-
-
Method Details
-
isWindows
public static boolean isWindows()Returns true if the Virtual Machine is running on a Windows operating system, false otherwise- Returns:
- true if the Virtual Machine is running on a Windows operating system, false otherwise
- Since:
- 2016.1
-
isMacOS
public static boolean isMacOS()Returns true if the Virtual Machine is running on a Mac operating system, false otherwise- Returns:
- true if the Virtual Machine is running on a Mac operating system, false otherwise
- Since:
- 2016.1
-
isLinux
public static boolean isLinux()Returns true if the Virtual Machine is running on a Linux operating system, false otherwise- Returns:
- true if the Virtual Machine is running on a Linux operating system, false otherwise
- Since:
- 2016.1
-
isJava8
Deprecated.The minimum JDK requirement is higher than or equal to 1.8, so this method will always return true. Code using this method to check the version can be simplified.Returns true if the Virtual Machine is running Java 8 or higher, false otherwise.- Returns:
- true if the Virtual Machine is running Java 8 or higher, false otherwise.
-
isJava9
Deprecated.useisJavaVersion(JavaVersion)
insteadReturns true if the Virtual Machine is running Java 9 or higher, false otherwise.- Returns:
- true if the Virtual Machine is running Java 9 or higher, false otherwise.
- Since:
- 2017.1
-
isJava10
Deprecated.useisJavaVersion(JavaVersion)
insteadReturns true if the Virtual Machine is running Java 10 or higher, false otherwise.- Returns:
- true if the Virtual Machine is running Java 10 or higher, false otherwise.
- Since:
- 2018.1
-
isJava11
Deprecated.useisJavaVersion(JavaVersion)
insteadReturns true if the Virtual Machine is running Java 11 or higher, false otherwise.- Returns:
- true if the Virtual Machine is running Java 11 or higher, false otherwise.
- Since:
- 2018.1
-
isJavaVersion
Check if the Virtual Machine is running with the provided Java version or higher.- Parameters:
aJavaVersion
- the java version to check against- Returns:
true
if the Virtual Machine is running with the provided Java version or higher,false
otherwise- Since:
- 2019.1
-
printSystemProperties
Prints all the system properties to the given PrintStream.- Parameters:
aPrintStream
- the outputPrintStream
.
-
isJavaVersion(JavaVersion)
instead