Hi there. I was hoping you could lend some insight into a little problem we
have.
I am a
Java developer and I am working with a C++ developer to make an
extension to an existing Win32 application.
We have written the add in using java and swing and we are using C++ to tie
the java code to the existing application.
We have been using JNI (obviously) and we can launch our program from a C++
executable by instantiating the JVM and using general JNI techniques.
However, when we plug our add-in into the existing application and launch
it we have some problems. It launches ok and seems to run fine but when we
close the java add in, it also shuts down the parent application.
Our java add in basically launches a Swing gui. When we close the java GUI
frame we seem to close everything and can't run any of our C++ code that
exists after the instantiation of the Java add in. I read our article and
studied your code and it all seems very similar. I'm thinking this may be
an issue with how this add in is handled as a
thread and how the
instantiation of the JVM is handled in the JNI code. I'm reaching here
since I am not a C++ guy and threading is something I know little about at
present. I use the System.exit(0); as a means of closing the application
and initially thought that may be a problem; but, you seem to do the same
thing in your article. Any ideas?
Any advice you could give us would be greatly appreciated. Thank you.
David Shepherd
Noonetime, Inc
Java Developer