The problem is this:
1. For nimbus and storm ui, we are launching directly in AppMaster, so we can easily get the absolute path of java. 
2. For supervisor, we are constructing the "java supervisor" command in AppMaster client, which is not on the same machine of NodeManager and java path is different. So, we have to use the JAVA_HOME env here.

So, the way to get java binary path is different, that is why I use getCommonJavaParameters instead of  buildCommandPrefix.