Installing Java JDK

From Projects Wiki
Jump to: navigation, search

Installing Java JDK

Submitted by Ed Schoolcraft

#!/bin/bash

sudo mkdir -p /home/pi/downloads
cd /home/pi/downloads
sudo wget --no-check-certificate http://www.java.net/download/JavaFXarm/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz
cd /usr/local
sudo tar -xzf /home/pi/downloads/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz

cd /home/pi
echo 'JAVA_HOME=/usr/local/jdk1.8.0' >>.bash_profile
echo 'PATH=$JAVA_HOME/bin:$PATH' >>.bash_profile

echo You should reboot to get the environment variables.

exit