@@ -0,0 +1,1136 @@
+package de.jpaw.util;%0A%0Aimport java.lang.reflect.Field;%0A%0Apublic class LibraryPathUtil %7B%0A    %0A    // workaround caching required. See http://blog.cedarsoft.com/2010/11/setting-java-library-path-programmatically/%0A    public static void setSystemLibraryPath(String path) %7B%0A        System.out.println(%22Setting library path to %22 + path);%0A        System.setProperty( %22java.library.path%22, path);%0A    %0A        Field fieldSysPath;%0A        try %7B%0A            fieldSysPath = ClassLoader.class.getDeclaredField( %22sys_paths%22 );%0A            fieldSysPath.setAccessible( true );%0A            fieldSysPath.set( null, null );%0A        %7D catch (NoSuchFieldException e) %7B%0A            throw new RuntimeException(e);%0A        %7D catch (SecurityException e) %7B%0A            throw new RuntimeException(e);%0A        %7D catch (IllegalArgumentException e) %7B%0A            throw new RuntimeException(e);%0A        %7D catch (IllegalAccessException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A    %0A    public static void setDefaultSystemLibraryPath() %7B%0A        String path = System.getProperty(%22user.home%22) + %22/lib%22;%0A        setSystemLibraryPath(path);%0A    %7D%0A%7D%0A

add util to set java library path programmatically