I installed java 7 (both the JDK and the JRE) on a MAC (OSX 10.10.3). java preferences shows the installed version correctly (1.7.0_80) as does the output of "java -version". However it seems some path/ environment variables are not updated since /System/Library/Frameworks/JavaVM.framework/Versions is still showing only up to 1.6 and not 1.7. Programs like Eclipse that are specifically looking for Java 7 or later in this path are hence failing to run.
Any suggestions ?