I am using JNA to access a C++ Shared Libary from Java. I have one class which has inside something like that "public interface InterfaceLib extends Library" and from this I am able to call the C++ methods and it works. The thing is that I want the data generated when calling these methods available to other classes (I have Jframes and want to go from one to another). My main problem if I have understand well is that I want the data generated by this particular instance of the class calling the JNA methods. Sorry if I can't explain it well. The only solution I have found so far, which works but I don't think is the most efficient is parsing the total amount of data acquired by one run of JNA methods to some class members and then parsing these members as arguments in the constructor of the next frame etc etc. To be more specific I have one button "Run system", when I press this I run my C++ code and these generates data for THIS run, what is the most efficient way to make this data for this run available to other classes?
Your question isn't entirely clear to me, but I think these are the key points (the second is the more important for what you're doing):