I take it you are logging in to your CentOS box as root, and running
Java that way. This will cause you problems down the line, however it is not directly related to your problem so I won't comment further at this time.
What changes did you make to your .bash_profile? Note - singular, not plural. If you changed .bash_profiles then you modified the wrong file.
Did you re-source the .bash_profile file after modifying it? That is: