Native: Kernel32Library throws NoClassDefFound if JNA is missing

Introduced by #8993
This commit is contained in:
tlrx 2014-12-22 11:24:31 +01:00
parent d8054ec299
commit 2ccfde76f1
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ public class Natives {
} else { } else {
logger.warn("unknown error " + Native.getLastError() + " when adding console ctrl handler:"); logger.warn("unknown error " + Native.getLastError() + " when adding console ctrl handler:");
} }
} catch (NoClassDefFoundError e) {
logger.warn("JNA not found: native methods and handlers will be disabled.");
} catch (UnsatisfiedLinkError e) { } catch (UnsatisfiedLinkError e) {
// this will have already been logged by Kernel32Library, no need to repeat it // this will have already been logged by Kernel32Library, no need to repeat it
} }