
Oracle Java versions require an account to download, and most are not compatible with Raspberry Pi. javac.Important: This guide will help you install the free, open-source OpenJDK version. Log out and log back in again and you should now have access to the Java Development Kit and the compiler tools e.g.Edit ~/.bashrc and add the following lines:Įxport JAVA_HOME=`update-alternatives –list java | sed ’s>/bin/java>’` As developers we need the JDK version so we’ll have to rejig our PATH environment variable so it picks up the JDK’s version of Java before the JRE’s. This is ok because all the applications on the platform will run under it. So when you type jave you’re getting the JRE version and not the Java Development Kit version and as a result you are not getting javac wither. The Java that has been installed here is the Java Runtime Environment (JRE).Java HotSpot™ Client VM (build 23.21-b01, mixed mode) Java™ SE Runtime Environment (build 1.7.0_21-b11) Update-alternatives –set java /opt/java/jdk1.7.0_21/bin/java


Scp jdk-7u21-linux-arm-sfp.tgz Open a PuTTY session to the Raspberry Pi.

Copy the file to the Raspberry Pi (from the command line).Navigate to the Java SE Downloads and click through JDK and get a copy of Linux ARM v6/v7 Soft Float ABI ( ).Using the instructions Installing and setting up a Raspberry Pi, install Soft-float Debian “wheezy”, -wheezy-armel (at the time of writing).You should consider using the OpenJDK which is installed on the normal wheezy. You should know that the build we are going to use, uses a software floating point algorithm instead of the on-board hardware it is as a result slower than the other plain wheezy version. So here are the instructions to get Oracle Java 7 up and running on a Raspberry Pi from scratch. I had great trouble installing Oracle Java on my Raspberry Pi due to the liblji.so problem.
