0

java.library.path value is set to a folder containing .dll files in the application. Now when we upgrade from java 9.0.1 to 9.0.4 this value is lost and the application does not launch since it cannot find the dlls. Setting the path value to code did not work using

System.setProperty("java.library.path", "./bin");

I have tried this answer too but this solution does not work for the latest java I guess.

Passing the value through

java -Djava.library.path=./bin 

works but I want to do this through code. Is there a way to do this?

labmat
  • 193
  • 1
  • 1
  • 10
  • How can you make sure that such a line is executed before the corresponding library is loaded? – Valentin Ruano Jan 18 '18 at 22:32
  • Are you saying that the code always had `System.setProperty("java.library.path", "./bin");` in it, and that code worked in 9.0.1 but does not work in 9.0.4? – VGR Jan 19 '18 at 01:42

0 Answers0