15

Unlike many popular programming languages, the popular Oracle Java package is only available using a PPA, not by the official repo.

Why isn't Oracle Java included in the standard Ubuntu repo?

Adam Matan
  • 12,519
  • 1
    Some additional and maybe interesting links about OpenJDK vs OracleJDK: http://stackoverflow.com/q/22358071/4464570 and http://askubuntu.com/q/437752/367990. – Byte Commander Jul 07 '15 at 09:35

2 Answers2

23

Ubuntu has OpenJDK in its repository. It's the fully open-sourced version of the Oracle JDK, which contains some closed-source parts.

It is a myth that OpenJDK is lower and less stable, but this was the past.
Today (since version 7), they're pretty equal. OpenJDK is even the reference implementation for Java 7 and Java 8. It's a race between those two implementations, as some new features appear first in OpenJDK and then later get included to OracleJDK, while some features get included the other way round.

The major differences are that OpenJDK has no Webstart included (but the open-source IcedTea does this job) and some other closed-source tools of Oracle missing, but nothing important.

So to sum up: As Ubuntu supports everything that is open-source, it supports OpenJDK, especially as it has no real disadvantages any more.

Byte Commander
  • 107,489
  • OpenJDK is even the reference implementation for Java 7. - by whom? – Adam Matan Jul 07 '15 at 09:44
  • https://jdk7.java.net/java-se-7-ri/ or https://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the should both prove that statement, as does every reliable source on the web. – Byte Commander Jul 07 '15 at 10:19
  • 1
    no offense meant here. You were making a strong argument in favor of openJDK, and it would make sense to support that argument with a canonical reference. – Adam Matan Jul 07 '15 at 10:27
  • 1
    No problem, I did not feel offended. I just wasn't 100% sure I correctly understood you. :) – Byte Commander Jul 07 '15 at 10:29
  • Thanks, it's a real relief. Mind if I edit your answer to inline the link? Do you have any link to the fact that Oracle JDK is close-source? – Adam Matan Jul 07 '15 at 11:15
  • 1
    http://programmers.stackexchange.com/q/171129 but OracleJDK is not fully closed-source, I think, because the code of OracleJDK and OpenJDK are nearly equal. It's just small closed-source parts (e.g. some code for graphics) and additional tools. And if you feel you can improve any post somehow, just do the edit. If I don't like it, I can roll it back anyway. No need to ask. – Byte Commander Jul 07 '15 at 11:28
  • 2
    The problem is that many web applications require Oracle Java. OpenJDK just does not work. – Pilot6 Jul 07 '15 at 12:05
  • 1
    My way through the internet did not pass any site that would have forced me to install Oracle Java yet... You just need IcedTea for Java Applets in browsers if you use OpenJDK, while this is already included in Oracle Java. – Byte Commander Jul 07 '15 at 12:13
  • 4
    The original question was "Why isn't Oracle Java included in the standard Ubuntu repo" and not "What can I use as a substitute in Ubuntu instead of OracleJDK". And I think the answer should be explaining some legal reasons. – karatedog Jul 07 '15 at 12:21
  • 1
    @karatedog More elaboration could be useful, but "some of the source is closed" is a good start. – Adam Matan Jul 07 '15 at 12:29
  • 1
    Just to second Pilot6's point, since I personally experienced severe issues when using Java apps from my company with OpenJDK a few years ago. I don't remember the specifics, but I remember I was able to get them to work correctly by switching to OracleJDK instead. Of course, this is anecdotal and could be the result of bugs that might have been fixed in the meantime, so take it with a pinch of salt. – Smig Jul 07 '15 at 14:06
  • The only bug I've experienced so far with OpenJDK is in OpenJFX (the Java FX implementation). If using OpenJFX, then fonts from files can't be loaded. – saiarcot895 Jul 07 '15 at 20:58
  • 1
    @Smig It would have been interesting which Java version this was. As stated in the answer, until version 6 OpenJDK was indeed not as good as Oracle's implementation in many points, but with version 7 they became pretty equal in performance and stability. – Byte Commander Jul 08 '15 at 05:55
  • 1
    @ByteCommander I had a fresh Ubuntu at hand, so out of curiosity I decided to install OpenJDK and try those same java apps out, and I couldn't find any problems with them anymore. Just wanted to leave this here for the record, so that problems I might have faced with previous versions don't steer people away from OpenJDK as a whole. – Smig Jul 31 '15 at 17:10
2

I think it's caused by licence:

  • OpenJDK is licensed under the GNU General Public License (GNU GPL)
  • Oracle JDK is licensed under 'Sun License'

To be honest, I would prefer to have Oracle Java in Ubuntu/Ubuntu-based since (unfortunately) some applications still demand it.

matandked
  • 1,129