Apple’s OS Lion has a pretty neat trick for handling the JAVA_HOME variable

Chill:bin rus$ /usr/libexec/java_home

which is super awesome as you can simply do

Chill:bin rus$ export JAVA_HOME=$(/usr/libexec/java_home)
Chill:bin rus$ echo $JAVA_HOME

to make sure you have the correct $JAVA_HOME set up, every time!

I’ve added this commend to my ~/.profile file so that whenever I open a new terminal, the $JAVA_HOME variable gets set correctly!

Previous articleBurger At The Thomas Kemp
Next articleIncome Report February 2013
Hi, I'm Rus and after 10 years of Linux administration and software development, in September 2014 I quit my day job, sold all my stuff and moved to Thailand to live the good life. My new website, http://www.ruspow.com shows how I'm making money online as well as what life can be like when you're not sat behind a desk and are free to make your own decisions!