Tuesday, February 4, 2014

Using the IntelliJ SBT plugin, and fighting the default Java version on MacOSX


I have downloaded the IntelliJ SBT plugin from this location.

The plugin's Github page is here : orfjackal/idea-sbt-plugin

I am running this on Mac OS X Mavericks.

I noticed a problem when opening the console : the Java version used to run the console was 1.8, which was generating a lot of errors. It looks like some scala or sbt basic libraries do not work fine with Java 1.8, or maybe it is the plugin.

So I was wondering where the SBT Console is pulling the Java version to use from. After a little bit of Googling, I found this article on Stack Overflow : How can I change Mac OS's default Java VM returned from /usr/libexec/java_home

This suggestion :

I think the only thing we might do is to change the plist:  
sudo vi /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Info.plist 
and then modify the JVMVersion from 1.8.0 to something else that makes it sort it to the bottom instead of the top, like !1.8.0.

has allowed me to run the SBT console under Java 1.7.0 until all issues related with Java 1.8.0 are solved.

No comments:

Post a Comment