The problem occurs when launching an application which loads a DLL. I'm doing it with System.load("C:\fullpath\test.dll")
. The project compiles with no errors, creates a jarfile Test.jar but when I run it with NetBeans it throws an exception
Exception in thread "main"
java.lang.UnsatisfiedLinkError: C:\fullpath\test.dll: Can't find dependent libraries
However if I run exactly the same code on Eclipse it runs fine. What I've found out that it's most probably a java bug because when running from command line gives such results:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar test.jar | Runs fine
"C:\Program Files (x86)\Java\jdk1.7.0_01\jre\bin\java.exe" -jar test.jar | Runs fine
"C:\Program Files (x86)\Java\jdk1.7.0_01\bin\java.exe" -jar test.jar | Throws an exception
And as I understand NetBeans runs the last command and therefore throws an exception. I tried searching on how to add a custom command or how to bind jre instead of jdk but with no success.