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
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum of the recognized java versions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisJava10()Deprecated.static booleanisJava11()Deprecated.useisJavaVersion(JavaVersion)insteadstatic booleanisJava8()Deprecated.The minimum JDK requirement is higher than or equal to 1.8, so this method will always return true.static booleanisJava9()Deprecated.useisJavaVersion(JavaVersion)insteadstatic booleanisJavaVersion(TLcdSystemPropertiesUtil.JavaVersion aJavaVersion) Check if the Virtual Machine is running with the provided Java version or higher.static booleanisLinux()Returns true if the Virtual Machine is running on a Linux operating system, false otherwisestatic booleanisMacOS()Returns true if the Virtual Machine is running on a Mac operating system, false otherwisestatic booleanReturns true if the Virtual Machine is running on a Windows operating system, false otherwisestatic voidprintSystemProperties(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:
trueif the Virtual Machine is running with the provided Java version or higher,falseotherwise- Since:
- 2019.1
-
printSystemProperties
Prints all the system properties to the given PrintStream.- Parameters:
aPrintStream- the outputPrintStream.
-
isJavaVersion(JavaVersion)instead