Fixed NoClassDefFoundError if JNA is missing on system

This commit is contained in:
Intelli 2024-08-15 19:55:21 -06:00
parent 1cf940e201
commit c6f8be9043

View File

@ -119,6 +119,7 @@ public class Util extends Queue {
public static CentralProcessor getProcessorInfo() {
CentralProcessor result = null;
try {
Class.forName("com.sun.jna.Platform");
Configurator.setLevel("oshi.hardware.common.AbstractCentralProcessor", Level.OFF);
SystemInfo systemInfo = new SystemInfo();
result = systemInfo.getHardware().getProcessor();