This question already has an answer here:
I am trying to run a server that requires Java 7 using terminal. After installing Java 7, typing java -version in terminal still shows Java 6. Previously, I would use the Java Preferences application, but Apple has removed it. Does anyone have any idea how to change the Java version the system uses without the Java Preferences application? Or if anyone knows a download link for Java Preferences, that would be greatly appreciated as I am able to achieve the same results by just using that. Thank you so much!
I am using the latest version of Mac OS X