Sunday 27 October 2013

Setting the Raspberry Pi's JAVA_HOME

The new Raspberry Pi build of Raspbian now comes with Java 1.7 pre installed.

If you need to set JAVA_HOME it can be set by carrying out the following to your ~/.bashrc

nano ~/.bashrc

then add the following and save the changes

export JAVA_HOME="/usr/lib/jvm/jdk-7-oracle-armhf"
export PATH=$PATH:$JAVA_HOME/bin

when you next login try typing:

 export

you will see a list of values, one of which should be

declare -x JAVA_HOME="/usr/lib/jvm/jdk-7-oracle-armhf"

A guide for installing and setting up the java 8 preview is available at :
http://www.savagehomeautomation.com/raspi-jdk8

No comments: