问题场景
项目中使用oshi,进行wmi查询时报错,正确maven配置如下:
<dependency> <groupId>com.github.oshi</groupId> <artifactId>oshi-core</artifactId> <version>5.2.2</version> </dependency> <dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId> <version>5.5.0</version> </dependency> <dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna-platform</artifactId> <version>5.5.0</version> </dependency>
来源:https://github.com/oshi/oshi/issues/827