from py4j.java_gateway import JavaGateway
gateway = JavaGateway()
java_object = gateway.jvm.mypackage.MyClass()
other_object = java_object.doThat()
other_object.doThis(1, 'abc')
Calling Java from Python