If u want it to be global gilty also for ur users ..
If u onlu add it to root/.bash_profile, the users can not source/read it during the login time, but add it to the users/.bah_profile should work .. In this cas u better put that added bash_profile in /etc/skel, so that each time u created an user, that added .bash_profile will be copied into user home dir.
Easiest would be put it in /etc/profile, I recommend also add lines like
export JAVA_HOME=PATH_TO_THE_JAVA_INSTALLATION to the profiles, otherwise some classpaths n many JavaLibraries, runtime couldn't be found if u compiles java-codes as if u put link to javaInstallation/bin/java into /usr/local/bin ..
That links point only to a single java-binary, not to javac, jar n many other tools .. To create so mnay link is absolutely not a clean solution than to add $JAVA_HOME/bin to $PATH ..