Added check for java vm in configure.ac to enable jni and jar file build. Added modified versions of ac_prog_java.