Fix the java component of SWIG; still need to fix documentation and jni lib extension.