Java update not working? well I have java 8 45 and when I go into terminal and do java -version it says this

"java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)"


But when I go to the java panel it tells me I have the latest version which is java 8 45. And I need to get this working asap because one of my minecraft server plugins needs java 8 and its not working. Can anyone help me with this problem thanks!
You can have multiple versions of JRE installed on your system. To see them all, use the following command:

/usr/libexec/java_home -verbose

The output is something like this:

1.8.0_05, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
1.7.0_51, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home


It lists all the JRE versions you've installed on your system, and the last line indicates which one is your current system default. To change that or manage it even better for any future needs take a look at this post on SuperUser. I believe this will solve your problem.