It all looks fine to me; what does "type java" report? And you did re-logon after editing /etc/profile, didn't you? Also, root might be overrinding the PATH setting for security reason. so try with another account.