when you're in /home/opt/java/ejre1.6.0_10/bin, did you type just "java" or "./java" ? note the dot and the slash at the beginning. unlike windows, linux shells usually don't have the current path in the PATH variable.
I think you also have to kill and restart your xterm so the new profile path gets refreshed...you can test this by just typing "ja" then hitting tab...it should autocomplete to "java"