This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Well, I got JNI to work fine on Linux as long as I don't do anything interesting. I'm now trying to pass in a string and get a string back. My java program takes a string from the command line and sends it to the JNI. The JNI reverses the string and returns it. The java program prints the results. If I run the program with no parameters, I get the default message. If I pass a parameter, I get some sort of crash. Here is what I have:
To answer my own question ... I change the value of s before passing it back to ReleaseStringUTFChars(), so it has no idea what to release. It turns out that there was a second flaw in the c program: I was returning buffy instead of s.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com