Reputation: 29439
I noticed that the version of Java I get when invoking it from the command line doesn't match the version reported by the Java Control Panel. Can someone explain whether this can cause problems and where the version information from the control panel is coming from?
Here's the terminal output:
MacbookAir1:Downloads palfvin$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Here's the control panel output:
Upvotes: 0
Views: 344
Reputation: 576
You indeed have more than a single version of Java installed. However, the version of java that is returned from the command line (as you indicated above) is referencing the version that comes with Mac OS X by default.
To refer to (and to make it the default ) version of Java as indicated by the control panel, you need to specify the path to that version in your $PATH variable (this is set in your ~/.bash_profile). This is how it appears in my ~/.bash_profile
export PATH="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin":$PATH
Upvotes: 2