My team is trying out JUnit for the first time, but when we try to run it we get an error message saying
java.lang.UnsatisfiedLinkError: no ntcore in java.library.path
We are using the default SampleRobot with the methods below added for testing.
@Test
public void testAdd() {
assertEquals(2, add(1, 1));
}
public int add(int a, int b) {
return a + b;
}
I had a similar problem with OpenCV when I first started. What solved the problem was adding the path to the .dll file path in VM arguments(Doesn’t look like JUnit has any .dll files) and using a system load library as the first thing in the constructor/main of my program.
//Example
System.loadLibrary("opencv_java310"); //opencv_java310 is the name of the .jar file