Closed unlimitedcoder2 closed 4 years ago
It's because JNIGI only converts primitive types between Go and Java . So the last two arguments to hashImage
need to be String objects, these must be created by the app. See https://github.com/timob/jnigi/blob/master/jnigi_test.go#L107 for an example of this. Basically you bass a []byte
to the String class constructor to create a String object which you can then pass to the method.
But this is still a bug in JNIGI, because it should return an error to indicate it doesn't know how to handle a type passed in an argument. Right now it just incorrectly creates the method signature and the returns NoSuchMethodError.
I know the classpath is correct and it detects the class but it cannot find my static method. any idea as to why it cant find my method?