Package com.sun.jna.platform.win32
Class VersionHelpers
java.lang.Object
com.sun.jna.platform.win32.VersionHelpers
The following functions can be used to determine the current operating system
 version or identify whether it is a Windows or Windows Server release. These
 functions provide simple tests that use the VerifyVersionInfo function and
 the recommended greater than or equal to comparisons that are proven as a
 robust means to determine the operating system version.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanApplications that need to distinguish between server and client versions of Windows should call this function.static booleanIsWindowsVersionOrGreater(int wMajorVersion, int wMinorVersion, int wServicePackMajor) This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release.static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic boolean
- 
Constructor Details- 
VersionHelperspublic VersionHelpers()
 
- 
- 
Method Details- 
IsWindowsVersionOrGreaterpublic static boolean IsWindowsVersionOrGreater(int wMajorVersion, int wMinorVersion, int wServicePackMajor) This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release. You should only use this function if the other provided version helper functions do not fit your scenario.- Parameters:
- wMajorVersion- The major version to test
- wMinorVersion- The minor version to test
- wServicePackMajor- The service pack to test
- Returns:
- True if the current OS version matches, or is greater than, the provided version information.
 
- 
IsWindowsXPOrGreaterpublic static boolean IsWindowsXPOrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows XP version.
 
- 
IsWindowsXPSP1OrGreaterpublic static boolean IsWindowsXPSP1OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 1 (SP1) version.
 
- 
IsWindowsXPSP2OrGreaterpublic static boolean IsWindowsXPSP2OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 2 (SP2) version.
 
- 
IsWindowsXPSP3OrGreaterpublic static boolean IsWindowsXPSP3OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 3 (SP3) version.
 
- 
IsWindowsVistaOrGreaterpublic static boolean IsWindowsVistaOrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows Vista version.
 
- 
IsWindowsVistaSP1OrGreaterpublic static boolean IsWindowsVistaSP1OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows Vista with Service Pack 1 (SP1) version.
 
- 
IsWindowsVistaSP2OrGreaterpublic static boolean IsWindowsVistaSP2OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows Vista with Service Pack 2 (SP2) version.
 
- 
IsWindows7OrGreaterpublic static boolean IsWindows7OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows 7 version.
 
- 
IsWindows7SP1OrGreaterpublic static boolean IsWindows7SP1OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows 7 with Service Pack 1 (SP1) version.
 
- 
IsWindows8OrGreaterpublic static boolean IsWindows8OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the Windows 8 version.
 
- 
IsWindows8Point1OrGreaterpublic static boolean IsWindows8Point1OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the
         Windows 8.1 version. For Windows 8.1 and/or Windows 10,
         IsWindows8Point1OrGreater()returns false unless the application contains a manifest that includes a compatibility section that contains the GUIDs that designate Windows 8.1 and/or Windows 10.
 
- 
IsWindows10OrGreaterpublic static boolean IsWindows10OrGreater()- Returns:
- true if the current OS version matches, or is greater than, the
         Windows 10 version. For Windows 10,
         IsWindows8Point1OrGreater()returns false unless the application contains a manifest that includes a compatibility section that contains the GUID that designates Windows 10.
 
- 
IsWindowsServerpublic static boolean IsWindowsServer()Applications that need to distinguish between server and client versions of Windows should call this function.- Returns:
- true if the current OS is a Windows Server release.
 
 
-