library ClassLoaderの使いどころが不明
例のEclipse ConのPDF見ると、クラスが解決できないときは、
こういう風にすればいいと書いてあったが、まだ使いどころがわからん。
いちいち入力するのたいへんなので、ここに貼っておこう。
Thread current=Thread.currentThread();
ClassLoader old=current.getContextClassLoader();
try{
current.setContextClassLoader(getClass().getClassLoader());
//do something.
}catch(Exception e){
e.printStackTrace();
}finally{
current.setContextClassLoader(old);
}