Installing Java / Limelight on OSMC Ras Pi 2?

Hi all,

I’ve recently installed OSMC and have been trying to use it as an all-in-one media center. I’d like to try Limelight, and have tried following instructions from here: GitHub - moonlight-stream/moonlight-embedded: Gamestream client for embedded systems

Unfortunately, I can’t get Java working. I have very little experience with Linux but have established there is no package on apt-get for the Java 8 SDK, so downloaded the .tar.gz file from Oracle and “installed” in the /home/osmc/java directory using sudo tar.

That all went fine, but ssh won’t recognise the java command. I mustn’t have installed Java in the right place to be executable, but don’t know where to start. Can anybody help?

I moved a post to an existing topic: Limelight Embedded and OSMC

sudo tar zxvf jdk-8-ea-b36e-linux-arm-hflt-*.tar.gz -C /opt
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1 
sudo update-alternatives for other commands if needed (e.g. javac).
java -version

I want to mention an alternative via “sudo apt-get install default-jre” … hoping that’s a welcome contribution here.

As of 2015-09-08, that gave me :
osmc@osmc:~$ java -version
java version “1.7.0_79”
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-1~deb8u1+rpi1)
OpenJDK Zero VM (build 24.79-b02, mixed mode)