This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
howto:linux:install:raspbian [2014/02/20 21:04] nx3 [FFMPEG] |
howto:linux:install:raspbian [2015/09/18 14:19] szati [Configure Java] |
||
---|---|---|---|
Line 8: | Line 8: | ||
http://www.raspberrypi.org/downloads | http://www.raspberrypi.org/downloads | ||
+ | "Oracle JDK 8 for ARM has JIT compiler and supports hard float point instructions. This is the fastest (1.5x-10x times faster than other JVMs) Java option for Raspberry Pi" | ||
==== Install Oracle Java for ARM ==== | ==== Install Oracle Java for ARM ==== | ||
Download Oracle JDK8 for ARM on your RaspberryPi and get the resulting file to your 'home' folder on Raspbian. | Download Oracle JDK8 for ARM on your RaspberryPi and get the resulting file to your 'home' folder on Raspbian. | ||
- | [[https://jdk8.java.net/download.html]] | + | http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html |
Oracle provide a good installation guide at: | Oracle provide a good installation guide at: | ||
Line 19: | Line 20: | ||
==== Configure Java ==== | ==== Configure Java ==== | ||
- | Switch to "su" (super user mode): | + | Decompress the tar file, the file name will change depending on the version you download |
- | <code>pi@raspberrypi $ sudo su</code> | + | <code> |
+ | sudo tar zxvf jdk-8u60-linux-arm32-vfp-hflt.tar.gz -C /opt | ||
+ | </code> | ||
Change the owner of JAVA: | Change the owner of JAVA: | ||
- | <code>root@raspberrypi /opt $ chown -R root jdk1.8.0</code> | + | <code>root@raspberrypi /opt $ sudo chown -R root jdk1.8.0_60/</code> |
Set where the Java components are installed: | Set where the Java components are installed: | ||
<code> | <code> | ||
- | update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1 | + | sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_60/bin/java 1 |
- | update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.8.0/bin/javac" 1 | + | sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_60/bin/javac 1 |
- | update-alternatives --set java /opt/jdk1.8.0/bin/java | + | sudo update-alternatives --set java /opt/jdk1.8.0_60/bin/java |
</code> | </code> | ||
- | Now exit "su" mode | + | Set version, you get to set as new versions of Raspbian have JDK7 preinstalled, you can install JDK8 as well just set which runs. |
- | <code>exit</code> | + | <code> |
+ | sudo update-alternatives --config javac | ||
+ | sudo update-alternatives --config java | ||
+ | </code> | ||
+ | |||
+ | Check versions | ||
+ | <code> | ||
+ | java -version | ||
+ | javac -version | ||
+ | </code> | ||
- | Check if JAVA works (version numbers will update from the example below); | + | Version numbers will update from the example below; |
<code> | <code> | ||
pi@raspberrypi ~ $ java -version | pi@raspberrypi ~ $ java -version | ||
- | java version "1.8.0-ea" | + | java version "1.8.0_60" |
- | Java(TM) SE Runtime Environment (build 1.8.0-ea-b36e) | + | Java(TM) SE Runtime Environment (build 1.8.0_60-b27) |
- | Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode) | + | Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode) |
</code> | </code> | ||
Line 48: | Line 60: | ||
Enter the following: | Enter the following: | ||
- | <code>JAVA_HOME="/opt/jdk1.8.0"</code> | + | <code>JAVA_HOME="/opt/jdk1.8.0_60"</code> |
Exit nano making sure you save the file. | Exit nano making sure you save the file. | ||
Line 56: | Line 68: | ||
Put the entries at the end of the file: | Put the entries at the end of the file: | ||
<code> | <code> | ||
- | export JAVA_HOME="/opt/jdk1.8.0" | + | export JAVA_HOME="/opt/jdk1.8.0_60" |
export PATH=$PATH:$JAVA_HOME/bin | export PATH=$PATH:$JAVA_HOME/bin | ||
</code> | </code> | ||
Line 110: | Line 122: | ||
start) | start) | ||
# start Serviio in background mode | # start Serviio in background mode | ||
- | su -l $User -c "/home/pi//serviio/bin/serviio.sh" > /dev/null 2>&1 & | + | su -l $User -c "/home/pi/serviio/bin/serviio.sh" > /dev/null 2>&1 & |
echo "Start Serviio..." | echo "Start Serviio..." | ||
;; | ;; | ||
Line 169: | Line 181: | ||
git clone git://git.videolan.org/x264 | git clone git://git.videolan.org/x264 | ||
cd x264 | cd x264 | ||
- | ./configure --host=arm-unknown-linux-gnueabi --enable-static | + | ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl |
make | make | ||
sudo make install | sudo make install |