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:
- 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.
- 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¶
Core Packages of generic support - status at Release 5.0.0 Oct 7, 2018:
implementation
description
core components
platform components
minimum set (?)
downloads
Initial tests of platformids
Native Platform Packages of supported platforms by JNA and platfromids - status at Release 5.0.0 Oct 7, 2018:
requiered by
category
ostype
os
arch
packages
platfromids
–
POSIX
BSD
FreeBSD
x86
–
OpenBSD
x86
–
Darwin
OS-X
x86
–
Linux
(any?)
ARM
–
x86
–
UNIX
SunOS/Solaris
x86
X
Windows
NT
>=XP (?)
x86
X
XP < (?)
x86
(?)
IoT
x86
– (?)
Platforms not actively supported by platformids - still may work.
category
ostype
os
POSIX
UNIX
AIX
UNIX
SunOS/Solaris
Linux
Android
Windows
NT
WinCE
Documentation and Sources:
Documents: doc.zip
Sources: src-full.zip / src.zip
7.3.3. Installation¶
The installation of the Windows-NT platform requires the packages within the CLASSPATH:
win32-x86-64.jar and/or win32-x86.jar - depends on the architectecture of the used JVM