Fixed get_java function