This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I've created the dll file and loading that from the Controller class by calling the system.loadLibrary("test.dll"); The same class is working fine if i create a standalone java application.
When executed, i am getting UnsatisfiedLink Error. I've the below questions.
1. Where should i set the -Djava option so that grails looks at the correct location for the dll.
2. If my controller has package name and the java class that has the native calls does not contain any package name, is it going to be of any issue?
3. Any other suggestions.
Here is what i am trying to do:
TestController.groovy
package com.abc.test.control;
class TestController {
static {
System.loadLibrary("libABCILib");
}
def validateJni ={
Test test = new Test() // Java class that has jni calls
test.create();
}
}
Test.java
public class Test {
// used to hold the C++ object pointer
private long Tesetobj;
// create native object
private native long create();