Okay I am having a hell of a time trying to figure out why my native method can change static variables and not instance variables in a
java class.
Basically I have a native method which returns a new class which holds a long value. Its how purpose in life is to hold one long variable.
The class is like this:
Now I have a method inside another class which returns a Window object with its handle;
I wanna do something like below, but it only works if I use a static variable in my Window class.
When CreateWindow is called it returns a new Window object with its handle. The problem is if I make the handle static then the handle gets passed from C to java. If I leave off the static because I would rather not have it static then the handle doesn't get passed to java from the C function.
Any help would be greatly appreciated.
Should I be so worried about using a static versus an instance variable? Does it make that much of a difference if I leave it as static?
Thanks,
Frank