0
votes

I am trying to load a system library "somesimplejava". I am passing its directory path as an argument to the JVM in eclipse JRE environment VM arguments.

-Djava.library.path=C:\Users\{username}\Desktop

This path contains somesimplejava.dll and somesimplejava.jar. Still, I am facing the below error while running its test case.

java.lang.UnsatisfiedLinkError: no somesimplejava in java.library.path

1
The first step would be to insert a System.out.println(System.getProperty("java.library.path"));, to check whether your option made it into the actual system properties. - Holger

1 Answers

0
votes

In order to define the java.library.path property in Eclipse, the following steps must be completed:

  • Select your project in the Package Explorer area and press a right click on it.
  • Select Build Path → Configure Build Path... option.
  • In the appearing window, select the Libraries tab.
  • Then, expand the JRE System library option and select the Native library location.
  • Click on the Edit... button at the right panel.
  • Locate the required library and then click OK.
  • Close the window.