This question already has an answer here:
Every single time I try to install the Oracle Java Runtime Environment... I keep being stuck with Apple's Java 6. I have no idea how Apple's Java 6 ended up on my computer in the first place.
I keep putting "java -version" into the terminal and it comes out telling me I'm still running 6...
How do I remove Java 6? All I want to do is manage to run a Minecraft server, but it demands Java 8.
(I'm running Mac OS X Yosemite, in case that is relevant, because I can't find any up-to-date tutorials on how to do this)
Thanks in advance.