特定のパスからクラスをロードするためのこの単純なコードがあります。
public static void main(String args[]) throws ClassNotFoundException
{
String str ="/Users/path/to/myclass.class";
Class<?> cl = ThisTest.class.getClass().getClassLoader().loadClass(str);
}
ここで何が間違っているのか誰か教えてもらえますか? ClassNotFoundException
実行時に取得し続けますmain
ありがとう