Oracle Java 8 Install

Does anyone know why I can’t install Oracle Java through apt-get on osmc linux?

I took a spare card and installed Raspbian from RaspberryPi.org and I am able to install Java from apt-get with this command

sudo apt-get update && sudo apt-get install oracle-java8-jdk

What’s the difference in osmc that prevents me from installing java via apt-get?

I may be missing something. I’m not great with linux.

Do you just want the runtime or the JDK? I’d try;

sudo apt-get install default-jre
Or
sudo apt-get install openjdk-8-jre

Thanks but I’m not looking for openjdk. I want oracle jdk.

I’m just trying to understand why it’s available in the raspbian apt repository and not in the osmc apt repository.

Licensing.

I believe Raspbian includes Minecraft, which requires an Oracle version of Java.

We don’t include Oracle Java because it’s non-free, and Debian doesn’t include it either. And we don’t include any variant of Java by default as there is no need for it in OSMC. There’s a perfect alternative – OpenJDK, which is available.

If you absolutely need Oracle’s Java, you can get it here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

Or pull the debs from Raspbian via their repository or apt’s download feature and dpkg -i them. They are fully self-contained.

Sam

Thanks for the explanation.

I need the oracle version for openHab. According to their website, OpenJDK is not supported. I’ll just install it manually as you suggested.

I was really just wondering why it’s not available. Your explanation is sufficient and makes good sense.

Thanks.

1 Like

The only thing to be aware of is you may need to keep the Oracle version of Java up to date manually. Copying a new version over the old should be good enough.

Sam