reduced the Java R_API footprint and fixed some other java related stuff