Can we recommend users to put java files under directories accessible by <hpcc user>? For example /home/<hpcc user>/java/. Current deploy-java-files.sh can add the path to classpath of environment.conf.

If this the case I don't need to do the following.

I will try to see I can modify deploy-java-files.sh to handle root user access. It is just lots of scenarios:
1) different user: root, Ubuntu (default admin user for Ubuntu), <hpcc user>
2) ssh connection with password of passwordless which is more common in most cloud environment.
3) no root admin user, for example Ubuntu, run command through sudo. It need copy file (scp) to a temporary directory and then ssh and run sudo to move the files to /opt/HPCCSystems/classes.

Current install-cluster.sh actually exposes the password if run 'ps -efa | grep install-cluster" since it embed expect code in bash.