7.3. JNA - Java Native Access

The provided packages are transparent to the user, though the Jython specific module simply converts the data to the canonical format of the platformids. Thus the following implementation details are of relevance for trouble shooting and development only.

7.3.1. Provided Packages

7.3.1.1. jy.dist.nt.Advapi32GetCurrentVersion

Registry access.

For implementation details see jy.dist.nt.Advapi32GetCurrentVersion(.java).

7.3.1.2. jy.dist.nt.Kernel32GetProductInfo

Some product information by the official API, to be basically ‘estimated’ else.

The applied APIs are:

  1. GetProductInfo

    The GetVersionEx interface is supported beginning with NT-6.0.

    Note

    see [GetProductInfo]

    Parameters

    dwOSMajorVersion

    The major version number of the operating system. The minimum value is 6.

    The combination of the dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, and dwSpMinorVersion parameters describes the maximum target operating system version for the application. For example, Windows Vista and Windows Server 2008 are version 6.0.0.0 and Windows 7 and Windows Server 2008 R2 are version 6.1.0.0. All Windows 10 based releases will be listed as version 6.3.

  2. GetVersionEx

    The GetVersionEx interface has changed with Windows-8.1 into GetVersionExA, where some different values are introduced.

    Note

    see [GetVersionExA]

    [GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions]

    With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version. The value returned by the GetVersionEx function now depends on how the application is manifested.

    For implementation details see jy.dist.nt.Kernel32GetProductInfo(.java).

    The platformids relies on the interface com.sun.jna.platform.win32.Kernel32.WinNT.GetVersionEx and the data com.sun.jna.platform.win32.Kernel32.WinNT.OSVERSIONINFOEX. It expects the changes of OSVERSIONINFOEXA were taken into account.

Another issue is the new numbering scheme introduced by NT-10.0. The product version and the build number are now distinguished, while the build number for major version-steps are subnumbered by the UBR instead of the SP. This is handeled by platformids by the applied registry interface via jy.dist.nt.Advapi32GetCurrentVersion(.java)..

7.3.2. Implementation Details

7.3.3. Installation

The installation of the Windows-NT platform requires the packages within the CLASSPATH:

  1. jna.jar

  2. jna-platform.jar

  3. win32-x86-64.jar and/or win32-x86.jar - depends on the architectecture of the used JVM