@Override
    public void checkLink(final String lib) {
        if (lib.contains("jaclib") && (lib.endsWith(".dll") || lib.endsWith(".dat") || lib.endsWith(".dylib"))) {
            throw new SecurityException("Denied access to " + lib);
        } else {
            checkPermission(new RuntimePermission("loadLibrary." + lib));
        }
    }