updated java , python scripts
java code updated