Thread.currentThread().getContextClassLoader().getResource();
dont code like above, but :
Thread current = Thread.currentThread();
ClassLoader oldLoader = current.getContextClassloader();
try{
current.setContextClassloader(getClass().getClassloader());
//call library code here
}finally{
current.setContextClassloader(oldLoader);
}
No comments:
Post a Comment