i am using a local .jar file in my eclipse project which loads a .dll itself:
private static void ForceReloadLibraryPath() {
/* */ try {
/* 731 */ Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths");
/* 732 */ fieldSysPath.setAccessible(true);
/* 733 */ fieldSysPath.set((Object)null, (Object)null);
/* */
/* 735 */ } catch (NoSuchFieldException var1) {
/* */
/* 737 */ System.out.println("Failed to adapt the java library path!");
/* */
/* 739 */ } catch (IllegalAccessException var2) {
/* */
/* 741 */ System.out.println("Failed to adapt the java library path!");
/* */ }
/* */
/* 744 */ }
/* */
/* */ static {
/* 752 */ String bitness = System.getProperty("sun.arch.data.model");
/* 753 */ String libpath = System.getProperty("java.library.path");
/* 763 */ boolean retry = false;
/* */
/* */ do {
/* 766 */ retry = false;
/* */
/* */
/* */ try {
/* 770 */ System.setProperty("java.library.path", libpath);
/* 771 */ ForceReloadLibraryPath();
/* 772 */ System.loadLibrary("AdsToJava");
/* */
/* 774 */ } catch (UnsatisfiedLinkError var6) {
/* */
/* */
/* 777 */ if (var6.getMessage().equals("no AdsToJava in java.library.path")) {
/* */
/* 779 */ System.out.println("AdsToJava.dll not found. Check your PATH environment variable!");
/* */
I am adding the AdsToJava.dll like properties -> build path -> Libraries -> JRE System Library -> Native Library Location but get the error messages
Failed to adapt the java library path!
no AdsToJava in java.library.path:...
The first message seem to be rather insignificant - i tried the same project on another laptop where I get the first message but not the second one and everything works properly. The second line I do not understand - I am adding the correct dll to the library path it should be there. Thank you for any suggestions!