#Java version switching on #OS X

If you have to deal with several projects that are based on different versions of Java here is how I’m solving this.

Recently I found out built-in OS X capabilities to switch between different version of Java installed on your system. After some period of time using it I come up with aliases to easily switch between Java versions installed on my machine, here are they:

alias j6='export JAVA_HOME="`/usr/libexec/java_home -v 1.6`"'
alias j7='export JAVA_HOME="`/usr/libexec/java_home -v 1.7`"'
alias j8='export JAVA_HOME="`/usr/libexec/java_home -v 1.8`"'
alias j9='export JAVA_HOME="`/usr/libexec/java_home -v 1.9`"'

#Gradle template with #code quality tools for #Java 8

Today was faced with strange bug during upgrade of Gradle template developed by Netflix to support recently released Gradle 2.0. The bug was connected with unable to run FindBugs, by the way this tool also released a support for Java 8 recently.

Fortunately step-by step it was clear that this is not due to Gradle 2.0 or updated FindBugs, it’s a miracle but strange hanging behaviour was related to added JCenter Maven repository before Maven Central repository, when this setting was reversed everything started to work here is a link to commit https://github.com/webdizz/gradle-template/commit/2b93fa80f9b1bac3c27f339d0cf3d33ab8e9873e.