Quick tip: Update Java to 8 and set it as default version

Well, first part is quite easy, just go to http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html and grab jre-8-macosx-x64.dmg. After downloading doubleclick and install as normal app. After installation new browser window will be opened so you can run applet to check if new version is working. It should. Now the hard part, go to Terminal and type:

you will see something like:

So does it work or not? Well, it is and it does not. Why? Becouse JRE just installed is only for browser. Apple allows only one JVM (Java Virtual Machine) at same time available for user, for Mavericks its Java 6. So what can we do to make it work also from commandline? Having Terminal opened type:

and now:

this time output will be:

So it seems everything works now. At least until Terminal restart. To make it permanent locate your .profile file (it is in /Users/xxx/.profile where xxx is your username), open it in any text editor and at bottom add:

Leave a Reply