Fixed gradlew env for java-code, sample, and java-sdk