Fixed the java issues