I just realized that you're using a jre instead of a jdk. That won't work, as any jni application such as nsjava requires a jdk.