Java 8 in OSMC?

Hello! I have a Raspberry Pi 3 running OSMC and I would like to have FileBot, but Java 8 isn’t in the official repos. I’m used to ArchLinux so I don’t know what’s the best way to install OpenJDK 8 here. Can anyone help me? I only find how to install Oracle version…

Thank you :slight_smile:

sudo apt-get install default-jre-headless

I assume Filebot is a GUI based tool, or?
So besides what @sam_nazarko writes about the jre you also would need to install the X11 solution that is discussed in another thread.

Filebot can be called with a set of command-line arguments directly from the console or in scripts.

I use it that way on my OSMC pi2. In fact the verbosity of the CLI can also help in figuring out why the more inscrutable GUI is failing to find your shows!

Thank you! I didn’t know default one was 8 :).

Thank all other people, too. I want to use this with CLI :).

Hello! I can’t execute FileBot Portable :(. I downloaded FileBot Portable from here and extracted it. Executing I get this.

osmc@Pi-osmc:~/Filebot$ sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/filebot/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    at sun.launcher.LauncherHelper.checkAndLoadMain(

Can anyone help me? I think it’s a Java issue, it needs Java 8 and it seems it’s trying to execute FileBot with 7 as it’s said here. I’m not a Java developer, and I don’t find how to “force” java 8 execution. Anyone can help me?

Steps to reproduce:

Install default-jre-headless as @sam_nazarko said to me.
Download Filebot from here.
Extract and execute

Thank you guys!

Indeed. It looks like you have JRE 7.

You can add Jessie backports repository, then do apt-get install openjdk-jre-8-headless or grab it from OpenJDK or Oracle website.

Like the OP, I had some issues with installing Java 8 (required by FileBot) on a recent OSMC (2017-02).

As implicitly concluded above, the default-jre-headless package currently installs Java 7. So Jessie backports as suggested by sam_nazarko is a good solution. I’ll just add some detail.

To enable Jessie backports and make its contents available, do something like:

echo deb jessie-backports main | sudo tee --append /etc/apt/sources.list
sudo apt-get update

To install the JRE package, there’s a special quirk:

sudo apt-get -t jessie-backports install openjdk-8-jre-headless

If “-t jessie-backports” is not included, it complains of a dependency problem and won’t install.

After this I can verify Java 8 is installed.

$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-1~bpo8+1-b13)
OpenJDK Zero VM (build 25.121-b13, interpreted mode)

(And now FileBot works too.)

Sorry for the delay, guys. I installed openjdk-8-jre-headless but I can’t use FileBot :confused:

osmc@Pi-osmc:~$ dpkg -l | grep openjdk
ii  openjdk-7-jre-headless:armhf         7u121-2.6.8-2~deb8u1         armhf        OpenJDK Java runtime, using Hotspot Zero (headless)
ii  openjdk-8-jre-headless:armhf         8u121-b13-1~bpo8+1           armhf        OpenJDK Java runtime, using Hotspot Zero (headless)

osmc@Pi-osmc:~$ java -version
java version "1.7.0_121"
OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-2~deb8u1)
OpenJDK Zero VM (build 24.121-b00, interpreted mode)

Is it needed something more? @anlag can you help me? :slight_smile:


Explain ‘can’t use’. It’s possible this application cannot be run headlessly.

Your default Java is version 7. Simplest unless you need to retain that for some reason is probably to just uninstall that:

sudo apt-get remove openjdk-7-jre-headless

Alternatively you should be able to configure Java 8 to be your default:

sudo update-alternatives --config java

After either of these steps, verify again with “java -version”.

FileBot can run headlessly, using for example the script in the root of the portable install directory.

Thank you @anlag ! I could set Java8 by default and use FileBot :D.

Thank you @sam_nazarko for all the help, and for developing this awesome OS, I follow it since Raspbmc :smiley: