0

This may seem trivial but I haven't been able to find a fix.

I've installed the latest Java runtime environment but when I run java -version on the command line, I still get Java(TM) SE Runtime Environment (build 1.7.0_40-b43)

However, when I test my Java version in browser, it works fine.

How can I get Terminal using the latest java version?

Tom
  • 1,068
  • 2
  • 25
  • 39

2 Answers2

1

see Installed Java 7 on Mac OS X but Terminal is still using version 6

maybe you need to select the java version you want to see.

Community
  • 1
  • 1
Ralf Reddin
  • 117
  • 5
0

I am assuming you are using windows.. from your command line

echo %PATH%

make sure your java PATH is pointing your latest java bin folder.

I am not sure about the Mac but Can you verify if you have symlink setup under /usr/bin?

ex. /usr/bin/java -> java_path

Maybe you can change this symlink to point to the latest java you have installed.