[build] don't call java outside of docker build-env