Fixed NoClassDefFoundError if JNA is missing on system
This commit is contained in:
parent
1cf940e201
commit
c6f8be9043
1 changed files with 1 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue