Skip to content

Commit

Permalink
Fixed NoClassDefFoundError when attempting to load plugin on 32-bit W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
Intelli committed Oct 3, 2024
1 parent 385c11a commit 70ffeac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/net/coreprotect/utility/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ public static CentralProcessor getProcessorInfo() {
CentralProcessor result = null;
try {
Class.forName("com.sun.jna.Platform");
if (System.getProperty("os.name").startsWith("Windows") && !System.getProperty("sun.arch.data.model").equals("64")) {
Class.forName("com.sun.jna.platform.win32.Win32Exception");
}
Configurator.setLevel("oshi.hardware.common.AbstractCentralProcessor", Level.OFF);
SystemInfo systemInfo = new SystemInfo();
result = systemInfo.getHardware().getProcessor();
Expand Down

0 comments on commit 70ffeac

Please sign in to comment.