/home/nameuser/.myProject/conf
実行時に構成ファイルをクラスパスに追加したいと考えています。
使用してみURLClassLoader
ましたが、成功しませんでした。
URL[] url={new URL("file://foo")};
URLClassLoader loader = new URLClassLoader(url);
また
ClassLoader currentThreadClassLoader
= Thread.currentThread().getContextClassLoader();
// Add the conf dir to the classpath
// Chain the current thread classloader
URLClassLoader urlClassLoader
= new URLClassLoader(new URL[]{new File("mtFile").toURL()},
currentThreadClassLoader);
// Replace the thread classloader - assumes
// you have permissions to do so
Thread.currentThread().setContextClassLoader(urlClassLoader);