had to add new thread to java JNI code to prevent threadlock w/swing.