changes to make visit_java_client function as a stand alone application