Adding includes for java, some other changes for Java