I am developing C++ DLL for JNI application. Here while calling methods from java, I am sending local parameter. They will modified internally by the method written. But their value is not reflecting outside.(Values get modified at their addresses). Modified value must reflect for further use. How can I access that value?
posted 8 years ago
It's not clear to me exactly what you're asking. It's probably not clear to anyone else, which is why there are no replies. You may have more luck if you give some concise code examples.
A Java native method is like any other Java method, when called by Java. The parameters are all passed by value. There are no OUT parameters in Java. The ways for the caller to receive information from the method call are first and foremost the return value, and second the side effects. An exampler of side effects is that the method call can change the data in one or more Java objects.
The C++ implementation of a Java native method can perform Java method calls or can directly change the data in Java objects. Look at the JNI API in detail to see how to do that.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.