Package com.jgcomptech.tools
Class OSInfo.Windows.CheckIf
- java.lang.Object
-
- com.jgcomptech.tools.OSInfo.Windows.CheckIf
-
- Enclosing class:
- OSInfo.Windows
public static final class OSInfo.Windows.CheckIf extends java.lang.ObjectContains boolean functions to check if certain conditions are true.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisActivated()Identifies if OS is activated.static booleanisCurrentUserAdmin()Identifies if the current user is an account administrator.static booleanisDomainJoined()Identifies if computer has joined a domain.static booleanisWin10OrLater()Identifies if OS is Windows 10 or later.static booleanisWin7OrLater()Identifies if OS is Windows 7 or later.static booleanisWin81OrLater()Identifies if OS is Windows 8.1 or later.static booleanisWin8OrLater()Identifies if OS is Windows 8 or later.static booleanisWindowsDomainController()Identifies if OS is a Windows Domain Controller.static booleanisWindowsServer()Identifies if OS is a Windows Server OS.static booleanisWinVistaOrLater()Identifies if OS is Vista or later.static booleanisWinXP64OrLater()Identifies if OS is XP x64 or later.static booleanisWinXPOrLater()Identifies if OS is XP or later.
-
-
-
Method Detail
-
isActivated
public static boolean isActivated() throws java.io.IOExceptionIdentifies if OS is activated.- Returns:
- true if activated, false if not activated
- Throws:
java.io.IOException- if error occurs
-
isWindowsServer
public static boolean isWindowsServer()
Identifies if OS is a Windows Server OS.- Returns:
- true if OS is a Windows Server OS
-
isWindowsDomainController
public static boolean isWindowsDomainController()
Identifies if OS is a Windows Domain Controller.- Returns:
- true if OS is a Windows Server OS
-
isDomainJoined
public static boolean isDomainJoined() throws java.net.UnknownHostExceptionIdentifies if computer has joined a domain.- Returns:
- true if computer has joined a domain
- Throws:
java.net.UnknownHostException- if error occurs
-
isCurrentUserAdmin
public static boolean isCurrentUserAdmin()
Identifies if the current user is an account administrator.- Returns:
- true if current user is an account administrator
-
isWinXPOrLater
public static boolean isWinXPOrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is XP or later.- Returns:
- true if XP or later, false if 2000 or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWinXP64OrLater
public static boolean isWinXP64OrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is XP x64 or later.- Returns:
- true if XP x64 or later, false if XP or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWinVistaOrLater
public static boolean isWinVistaOrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is Vista or later.- Returns:
- true if Vista or later, false if XP or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWin7OrLater
public static boolean isWin7OrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is Windows 7 or later.- Returns:
- true if Windows 7 or later, false if Vista or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWin8OrLater
public static boolean isWin8OrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is Windows 8 or later.- Returns:
- true if Windows 8 or later, false if Windows 7 or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWin81OrLater
public static boolean isWin81OrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is Windows 8.1 or later.- Returns:
- true if Windows 8.1 or later, false if Windows 8 or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
isWin10OrLater
public static boolean isWin10OrLater() throws java.io.IOException, java.lang.InterruptedExceptionIdentifies if OS is Windows 10 or later.- Returns:
- true if Windows 10 or later, false if Windows 10 or previous
- Throws:
java.io.IOException- if error occursjava.lang.InterruptedException- if command is interrupted
-
-