
Ubuntu: Java packages in Partner archive to be removed on 2012-02-16   - philips
https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html
======
wmwong
They offer a solution for the transition:
[https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/Java6Transiti...](https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/Java6Transition)

~~~
mey
I've been aware of the removal, but I think this is the first time I've seen
the actual reason for this. Thanks for sharing this link.

------
lnanek
I was pretty floored the first time I was diagnosing a server problem and it
turned out an Ubuntu update had pulled the Sun Java out from underneath the
Tomcat server that was running and replaced it with OpenJDK, which didn't work
for the big webapps that were running. That was last year, though - maybe that
was it moving to partner and now it is moving again? I wish they would
restrict this funny business to distro upgrades, which people expect to break
things.

~~~
gravitronic
Do you usually let ubuntu upgrade packages automatically on live systems? I am
not a server admin but that seems like a plan for constant random breakage...

~~~
jiggy2011
I do, how else can I be safe(ish) from having my server attacked by some
random 0day just because I didn't happen to check the advisories for every
single daemon I use every week?

~~~
0x0
Or you can get "push notifications" of security updates via SMTP,
[https://lists.ubuntu.com/mailman/listinfo/ubuntu-security-
an...](https://lists.ubuntu.com/mailman/listinfo/ubuntu-security-announce) :)

------
philips
What strategy are people taking on this?

Perhaps it is time to revive the java-package debian package:

<http://wiki.debian.org/JavaPackage> <http://packages.debian.org/lenny/java-
package>

I forked it here and will be looking into it later today:
<https://github.com/philips/java-package>

------
jiggy2011
This is very annoying.

The process of doing a Linux install / upgrade of Java from the packages
provided on the Oracle website is a real pain since they don't have their own
apt repo or even provide a .deb.

OpenJDK may be a fine replacement for many use cases but it's really not a
100% drop in replacement. Minecraft requires Oracle Java for one , and I'd
hate to think what would happen if you were using ubuntu to host anything
important that required it.

This is the sort of stuff that ruins the ubuntu's UX.

~~~
Confusion
It surprises me Oracle doesn't provide a .deb for their JRE/JDK: they do for
Virtualbox (they even have a repo). So why not for the JRE/JDK?

~~~
rcthompson
VirtualBox provided an apt repo before Oracle (or was it Sun?) bought them. So
they already had the infrastructure set up for providing apt packages. No
reason to dismantle it after the acquisition. In contrast, I don't think
Oracle/Sun have ever provided debs for Java, so doing so now would require an
investment of time, effort, and community collaboration to ensure that their
debs incorporate themselves correctly into the system (via "update-
alternatives" and such things).

------
SkyMarshal
This is for Ubuntu < 11.10. They're already gone in the 11.10 repositories. I
just went through the ordeal of manually installing and setting up JDK6 and
JDK7 alongside OpenJDK. Here's how, along with some useful update-alternatives
scripts:

1\. Download from Oracles' site <http://www.oracle.com/java>. extract, and
copy the extracted folder to /usr/lib/jvm (where openjdk is installed by
default).

2\. Change the _default-jvm_ soft link to the new jdk:

 _> cd /usr/lib/jvm

> sudo rm default-jvm

> sudo ln -s jdk1.6.0_30 default-jvm_

3\. In .profile or .bash_profile add:

 _export JAVA_HOME=/usr/lib/jvm/default-jvm_

(no need to add $JAVA_HOME/bin to your PATH, _update-alternatives_ takes care
of that by linking it to /usr/bin)

4\. Add the new JDK to /etc/alternatives with _update-alternatives_ command.
The trick here is to slave all the jdk1.6.0_30/bin supporting programs to
jdk1.6.0_30/bin/java, so that changing from one java to another also changes
all the supporting programs as well. Without slaving them, you have to call
_update-alternatives --config_ on _all_ of them separately, and there are
quite a few as can be seen in the scripts below.

[https://raw.github.com/byrongibson/scripts/master/install/ja...](https://raw.github.com/byrongibson/scripts/master/install/java/java-
alt-install-oraclejdk6-server-allslave.sh)

[https://raw.github.com/byrongibson/scripts/master/install/ja...](https://raw.github.com/byrongibson/scripts/master/install/java/java-
alt-install-oraclejdk7-server-allslave.sh)

[https://raw.github.com/byrongibson/scripts/master/install/ja...](https://raw.github.com/byrongibson/scripts/master/install/java/java-
alt-remove-all.sh)

That's it. This lets you install JDK6 and JDK7 side-by-side with OpenJDK
(which I apt-get installed first, fwiw), and switch between them with a quick
_update-alternatives --config_ , and changing of the _default-java_ soft link.

Doing it this way lets you install any number of JDK versions or minor
versions side-by-side, and easily switch among them, or upgrade from one to
another, and switch back if the new version borked whatever you were running
on it.

Of course, no more automatic security updates, so you have to keep an eye on
that and download the new Oracle JDK minor/update versions when they're
released, but on the other hand it's much easier to roll back if an update
breaks something, since the prior working version is still there and just and
_update-alternatives_ away.

~~~
dekz
Why is this easier than making ~/lib/java-latest softlinked to
~/lib/jdk1.6.0_30 then just re-linking to the one you want to use while having
export JAVA_HOME=~/lib/java-latest in ~/*rc .

At least this way it isn't ubuntu specific and you don't have to know about
update-alternatives (first time for me hearing of that).

~~~
SkyMarshal
You could do that too, only problem I can think of is if you also want to
install OpenJDK from the Ubuntu repos.

Presuming that, in addition to what you said, you also add your new
$JAVA_HOME/bin to your $PATH, then you'll have a namespace collision in your
PATH between $JAVA_HOME/bin/java and /usr/bin/java (OpenJDK linked via
/etc/alternatives/java via /usr/lib/jvm/openjdk/bin/java, which is the default
install setup for openjdk, on 11.10 at least).

If you're installing OpenJDK manually too, instead of via repo, or not at all,
then keeping all your jdk's in ~/lib might be a better option overall.

------
stewbrew
IMHO the headline should be changed to something like "openjdk packages are
favoured over sun-java-* packages, which will be removed ...".

~~~
akent
It's nothing to do with favouritism, Ubuntu are not licenced to distribute it
any more:

 _As of August 24th 2011, we no longer have permission to redistribute new
Java packages as Oracle has retired the "Operating System Distributor License
for Java"._

------
helper
For the people using OracleJDK, what are the advantages it has over OpenJDK?
Are the differences less in JDK7 vs JDK6?

~~~
drivebyacct2
I'd like to hear detailed examples of people having problems with OpenJDK. I
hear a lot of anecdotal examples, but I've had no problems using it for a wide
range of things. The only thing I've heard with enough authority that I buy is
that there are problems building Android with the OpenJDK toolset.

~~~
cultureulterior
OpenJDK Doesn't work with the supermicro ipmi-KVM tool. It's been brought up,
but closed as wontfix.

------
sciurus
This was previously discussed at <http://news.ycombinator.com/item?id=3357623>

Note that back in December they were planning to push "empty packages to the
archive, so that the Sun JDK will be removed from all users machines when they
do a software update". Now they've changed their minds: "In order to prevent
unexpected failures, we will not be pushing out empty packages before removing
them from the archive."

------
babarock
I'm confused. According to the Wikipedia article on Java, the source code is
released under GPL. Isn't this enough for Canonical to host and distribute the
binaries?

~~~
thristian
Apparently, there's the open-source, Free Software OpenJDK, which is freely
distributable and which Canonical still distributes, but there's also the
official Java binaries released by Sun/Oracle which are under a more
restrictive licence. The official binaries for Java 6 are close enough to the
OpenJDK implementation that most things run, and the official binaries for
Java 7 are actually based on OpenJDK 7, but there's still differences.

I've heard of Java-based production systems that were broken by a minor point-
release of the official Java binaries, so it's not surprising to me that
people would be skittish about switching to an entire other implementation.

------
siegler
[http://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_th...](http://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the#comment-1307811963518)
_Note that the RI has a very specific purpose (eg, to serve as the RI) and is
generally not updated except when/if the specification is revised._

So OpenJDK may be adequate as a RI, but will be unstable to use in a
production environment.

------
j_baker
_We apologize for any inconvenience this may cause, and thank you for your
understanding._

Urgh... Couldn't they have phrased this any differently? The only thing that's
missing is "Please hold. Your call _is_ important to us."

~~~
andos
Differently? How? Honest question: What's wrong with apologizing and expecting
the users to understand there's nothing else they can do?

~~~
tomjen3
Provide a link to an alternative directory, or at the very least a script.

~~~
andos
They provide a link to a Java 6 Transition wiki in the end of the e-mail.

~~~
tomjen3
How do I add that to apt-get sources?

------
keturn
Create a local 'apt' repository for Ubuntu Java packages:
<https://github.com/flexiondotorg/oab-java6>

Just tried it earlier today on 11.10. Worked fine.

------
th0ma5
would be a great opportunity for someone to write a wrapper script that
downloads updates, etc... sucks that oracle can't just let distros figure it
out for their respective systems... i guess apple takes the tack of being slow
on java, so whatever.

