In the case of java - definitely add it to your PATH as Brian1 suggested. The reason for this is that there are other java programs such as java, javac, javadoc ...
Also, I think Fedora comes with GNU Java - which is all in /usr/bin. If you add the java directory to your path thus:
then entering the java command will result in the correct one being executed.
I hope this helps