How do I install non-free Java in 11.10?

Asked by tdn

How do I install non-free Java in 11.10?

I have read https://help.ubuntu.com/community/Java, however, it seems rather outdated. For example, it mentions adding lucid partner sources. Is that really correct to do in 11.10?

From the Java help page:
``The Sun Java 6 packages are available from the partner repository. You can configure your system to use this repository via command-line:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"''

Should I really do that in 11.10? I already have
 deb http://archive.canonical.com oneiric partner
But sun-java packages are not available for install.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sun-java6 Edit question
Assignee:
No assignee Edit question
Solved by:
enubuntu
Solved:
Last query:
Last reply:
Revision history for this message
Best enubuntu (mr.tennents) said :
#1

The official Java was removed from the Ubuntu repository.
You can install it with one of this way:

1. Install Java 6:
-
1. Open a terminal by hitting CTRL + ALT + T
2. Insert and run this command:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

----

2- Install Java 7:
Follow this:
http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html

Revision history for this message
tdn (spam-thomasdamgaard) said :
#2

Number 1 seemed to work. Thanks.

Revision history for this message
tdn (spam-thomasdamgaard) said :
#3

Thanks Enrico "eNry" Carafa, that solved my question.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

Just one point: OpenJDK is official Java too. (It's the official free open source Java, provided by the openjdk and icedtea packages, whereas the sun-java packages provide the official proprietary Java.) See http://en.wikipedia.org/wiki/OpenJDK for details.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Please don't advise users how to BREAK the Oracle license. Oracle do NOT want their Java product packaging. That's why it is no longer in the official repos. The way to install Oracle Java and NOT breach the license is to grab the java binary file from www.java.com and run it, you can then symlink the plugin file to your browsers plugins folder

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

@actionparsnip
The PPA is hosted *here* on Launchpad, so if it is a violation of applicable law to package and distribute the software in it, Oracle should address that by contacting Canonical about the PPA and requesting its removal. As long as the PPA is here, it is appropriate to provide advice about how to use it, and inappropriate for you to seek to suppress others' efforts to provide support for it. Please do not do that. If you think the actual act of using the PPA might violate some laws somewhere, then you should certainly warn us about that...and provide specific evidence, perhaps including excepts from the Oracle EULA as well as a link to the full text so that they can be re-read in context.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

The PPA is nothing to do with Canonical. It is maintained by a user whom is not affiliated in an way with Canonical.

http://sylvestre.ledru.info/blog/sylvestre/2011/08/26/sun_java6_packages_removed_from_debian_u

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

@actionparsnip
I did not say the PPA was maintained by Canonical. It is *hosted* on Launchpad.net. Instructions in this question and elsewhere that tell how to use it are *hosted* on Launchpad. If objections to it being hosted on Launchpad have insufficient merit for Canonical to remove it, then it is inappropriate to tell people not to talk about how to use it. As long as the PPA exists on Launchpad, Canonical has decided that it is OK to provide people the means to use the software from the PPA, so telling people not to do so is wrong. On the other hand, if Canonical removes it, then no harm to Oracle can come from the (then defunct) instructions people have given for its use.

If you think I am mistaken, and that Canonical is unaware of the PPA but would remove it if they knew about it, then I think you underestimate them...but you might consider complaining about it at https://answers.launchpad.net/launchpad. Of course, while I cannot speak for Canonical any more than you can speak for Oracle, I think Canonical would almost certainly want you to cite an official source of information showing that it is illegal for them to host the PPA.

If software is hosted on Launchpad, then trying to stop people from talking about how to use it on Launchpad is not something that should be done lightly. It is certainly not something that should be done without consulting others. Please do not do it without consulting others. Specifically, please do not do it without consulting the people who decide what kind of content may be hosted on Launchpad, and who shoulder the ultimate burden of any liability associated with that content.

This is a separate matter, since whether or not it is legal to host the PPA is not the same question as whether or not it is legal to use it. But as far as I can tell, the link you provided does not speak to the question of whether or not (or better put: in what jurisdictions, if any) it is illegal for an individual to install Java from that PPA. It is also not an official source of information about Oracle's Java.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

It's still not a good idea to help users infringe on licensing. It's not a million miles away from giving links to illegal downloads. You are advising users violate the license of the software. Just because a PPA exists does not make it ok to use it. The violation will still occur as Oracle don't wan't their software packaged and as users we must respect that.

I'll log a bug and this can all end nicely

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

I'm glad you have consulted others by filing bug 884169, and that the bug has resulted in a question being posted in the appropriate place for this to get looked into (https://answers.launchpad.net/launchpad/+question/176974). I would encourage you to cite and quote the applicable license text itself (to do so in that bug or question, I mean--I'm not asking you to post here again if you don't want to), or at least to cite and quote official statements by Oracle on the matter. In my opinion, to do otherwise would be to continue to demand that others change their behavior without making reasonable efforts to show why they should.

"It's still not a good idea to help users infringe on licensing."

After several opportunities, you have still not established that there is infringement going on. However, I presume that you will attempt to do so soon, by providing Canonical with the specific information you have not provided here. So thank you for your efforts on this issue. If infringement of Oracle's license is occurring, then you are right that it should not be perpetuated or facilitated on Launchpad.

"It's not a million miles away from giving links to illegal downloads."

The distinction between criminal copyright infringement and the civil tort of copyright infringement (which is not just a distinction applicable in the US, where I am from) is often neglected, and I think you may be neglecting it too in comparing to "illegal downloads." But I am not sure, because so far the specific licensing restrictions have not been explicated with specific references to one or more primary sources.

"You are advising users violate the license of the software."

The English language lacks an elegant way to speak of people in general, so "you" is often used. I presume that is what you mean here, in your unfortunate wording. Nonetheless, I want it on the record that, thus far, I have not personally provided information about how to use the PPA at issue, to obtain Oracle's Java implementation on any system for which it is not also provided in the partner repository[1]. In particular, I have not done so in this question.

In the future, if the situation arises where I think the PPA would be useful, I would be willing to provide instructions, since you have repeated failed to cite any reliable source[2] to substantiate your claims that it is legally problematic, which makes me think your claims are not credible. However, since I am aware of the controversy, I would at least consider cautioning people about it.

"Just because a PPA exists does not make it ok to use it."

The appropriate response to a Launchpad PPA one thinks provides infringing software is to complain to Canonical. Any other response shows a lack of seriousness about the matter. By way of analogy, one would not attempt to treat a burn without first putting out the fire. I am glad you have started that process, which I anticipate will lead to a more objective determination of whether or not the PPA is OK to use.

[1] That is, not for Oneiric or Precise, nor for any EoL releases. See https://launchpad.net/ubuntu/+source/sun-java6. (Unlike the PPA at issue, those download links are provided and officially endorsed by Canonical, for the Ubuntu releases to which they are stated to pertain.)

[2] The source you cite does not even itself appear to cite any official source of information or to quote anything Oracle has published or that Oracle representatives have said. The specific details about what is and is not permitted are missing. The source cites a source that says that a license has "been retired" but it does not give details about exactly what that means, nor does it cite a source to indicate that. On the basis of the information you have provided, Canonical employees might do this legwork themselves, but I think it would be helpful for you to do it. Of course, I understand why you might not want to. Who wants to work for free for Oracle?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

I've reported the bug

Revision history for this message
Keith Drummond (kd353) said :
#12

I use the ppa:ferramroberto/java but have been getting error messages on some sites saying that the installed version of Java is out of date and needs updating.

I would use the OpenJRE but it does not work on several sites and for running college material.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#13

Indeed, the PPA only provides Oracle's proprietary Java up to version 6u26 (see https://launchpad.net/~ferramroberto/+archive/java). The latest 6-series Java is currently 6u29 (see http://www.oracle.com/technetwork/java/index.html), and there's Java 7 now too. So you'd be best served by either installing Java from the official installer available on the Oracle website (let us know if you need help with this), or using OpenJDK instead (please also feel free to let us know if you need help with that).

If you're using major version 6 of OpenJDK and finding it doesn't work for your needs, you might try OpenJDK 7. Also, please remember that for Java content on the web with OpenJDK, you must have the icedtea plugin package installed too. With that said, it is possible that the content you need to use simply does work with some versions of the proprietary Java virtual machine, and does not work with any versions of the free open source VM.

In his official capacity as a Canonical Launchpad engineer, Julian Edwards has said that actionparsnip's complaint that ppa:ferramroberto/java violated Oracle's license terms was investigated and determined to be incorrect, since the version provided in the PPA (6u26) does not have the new terms. (See https://answers.launchpad.net/launchpad/+question/177015.) However, since that version is old and it is not ideal to use that version (in fact, if I recall correctly, I think there have been security updates to Java since that version...), it seems that actionparsnip was ultimately right in the limited sense that we should still avoid recommending that PPA.

Revision history for this message
Tong Sun (suntong001) said :
#14

> you might try OpenJDK 7 . . .

Just FTA, Open JDK version 7 will be officially compatible with Sun JDK 7.

the Oracle JDK will "reate RI binaries based only on the OpenJDK code base."
http://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the

Also see,
http://blogs.oracle.com/henrik/entry/java_7_questions_answers

Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK?
A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.