I have updated Java to version 7. When I open the Java control panel it says i have v 1.7.0_60 but when I run java -version from terminal it says i have JVM v 1.6.0_65. I'm not sure where to go from here, I'm a beginner here. I looked for the eclipse.ini file as referenced in this post, but I only saw config.ini no eclipse.ini. I also double checked that i had the 64bit version as referenced in this post.
Asked
Active
Viewed 823 times
2
-
Where did you look for `eclipse.ini`? It's definitely there, and it definitiely needs to be pointed to the correct JVM/JDK; Eclipse doesn't use `JAVA_HOME` and on OS X it's black magic trying to correctly configure the desired JVM version. – E-Riz Jul 10 '14 at 22:01
-
The `eclipse.ini` is hidden in the Eclipse package - in Finder go to your eclipse install and look in that folder. Right click on the `Eclipse` app and select `Show Package Contents`, look in Contents/MacOS – greg-449 Jul 11 '14 at 07:32
2 Answers
0
The version of java hit by java -version
is going to be the version that is configured in your PATH
system environment variable, which is not related to what you see in the Java control panel. Alter it to point at your new JVM installation and restart your terminal and you should see it take effect.

Jonathan Schneider
- 26,852
- 13
- 75
- 99
0
Try adding the following to the .bash_profile file in your home directory:
export JAVA_HOME=
/usr/libexec/java_home -v 1.7
(Then open a new terminal window, or type "source ~/.bash_profile" for the change to take effect).
You should be able to switch between versions by changing the version number (if necessary).

Ian
- 7,480
- 2
- 47
- 51
-
This is essentially what solved it, though I would actually like to know why it solves it? I also needed to rm the "currentjdk" and then change PATH. Reinstalled JDK 7 and then finally added the above file as suggested. Whew, that was a pain and a time suck. Thanks for all the suggestions. – devin e Jul 12 '14 at 03:23