在windows11上使用oshi-core库获取系统信息报错:
IllegalStateException: Unmapped relationship: 7
引用的maven依赖如下:
<oshi-core.version>5.4.1</oshi-core.version>
<jna.version>5.5.0</jna.version>
到github上查issue如下:
IllegalStateException: Unmapped relationship · Issue #1554 · oshi/oshi
说是要使用新版本的jna,修改后的maven配置如下,问题解决:
<oshi-core.version>5.4.1</oshi-core.version>
<jna.version>5.10.0</jna.version>