What sets my Java Virtual Machine?
In your current terminal session you can select the JVM using
/usr/libexec/java_home -v 1.8 see java_home --help for more options. 

For GUI applications you should set JAVA_HOME as an environment variable.  Setting Environment variables in Mac OS is explained in Environment variables in Mac OS X on StackOverflow. Be aware that ~/.launchd.conf is deprecated: man launchd.conon Yosemite


  ...launchd.conf is no longer respected by the system. ...