static
{
Method llm;
try {
//获取私有的方法 loadLibrary0
llm = ClassLoader.class.getDeclaredMethod("loadLibrary0", new Class[]{Class.class,File.class});
llm.setAccessible(true);//破解权限
String path = new File("").getAbsolutePath();
llm.invoke(null, new Object[]{SendRev.class,new File(path + "\\lib\\test.dll")});
} catch (Exception e) {
e.printStackTrace();
}
}