hmm, I basically just read JNI tutorial online, which basically breaks down to:
- declare your method native
- javah -jni <java class> the file to get a header
- create the native implementation, using the header from javah
- compile and link with jdk/includes jdk/includes/win32
if you need to access fields from java, you need to get the signatures via the javap -s <java class> command
The stuff that gets tricky is when you do loads of code in C, which you should avoid - as much as possible, bring it to the java side.
Additionally, be aware of callbacks from other threads in C, they don't have access to the VM, unless their specifically attached (you don't want to know how long that took me to figure out in the fmod port!!).