Mine the Harvest

Oh Ubuntu, Why Hast Though Forsaken Sun Java?

by on Apr.20, 2010, under Uncategorized

With Lucid, the standard Ubuntu repos no longer contain the Sun version of Java, having opted instead to just go with openjdk. While I can certainly understand the desire to have openjdk be the truly open solution, I am accustomed to the Sun version. Also, when using java-6-openjdk , I ran into a very annoying situation where apt kept running into the following issue when you attempted any transaction:

error adding signet.pl/signet_ocspklasa3_pem.crt
error adding signet.pl/signet_pca2_pem.crt
error adding signet.pl/signet_pca3_pem.crt
error adding signet.pl/signet_rootca_pem.crt
error adding signet.pl/signet_tsa1_pem.crt
error adding spi-inc.org/spi-ca-2003.crt
error adding spi-inc.org/spi-cacert-2008.crt
error adding telesec.de/deutsche-telekom-root-ca-2.crt
failed (VM used: java-6-openjdk).
dpkg: error processing ca-certificates-java (–configure):
subprocess installed post-installation script returned error exit status 1

In addition, I was having trouble with the openjdk in Eclipse with Subversive and was longing for the Sun Java version. But it was nowhere to be found in the repos. Sigh.

I Googled about and saw a lot of similar difficulties and frustration that the Sun version was not available. Sure, you can install it and the browser plugins, etc. manually, but really – why? Fortunately, I was able to find a simple solution to install sun-java6-jdk on Lucid!

This very simple fix came from this blog site.

Just remove openjdk if you already installed it:

sudo apt-get removeĀ  openjdk-6-jre icedtea6-plugin

Now, set up the partners repo and install Sun Java from there:

sudo apt-get install python-software-properties
sudo add-apt-repository &#34deb http://archive.canonical.com/ lucid partner&#34
sudo aptitude update
sudo aptitude install sun-java6-jdk
sudo apt-get install sun-java6-plugin

Done!

:, , , , ,
3 comments for this entry:
  1. Fatman

    The apt-add-repository command gives the error:
    Error: need a repository as argument

    if you copy-and-paste the command without replacing the smart quotes with straight ones. Otherwise, works a treat. Thanks!

  2. Brus

    Hey, I’ve been trying to the same in Ubuntu Natty 11.04 Server. Every time I try to install Tomcat6 I get the same error:

    error adding telesec.de/deutsche-telekom-root-ca-2.crt
    failed (VM used: java-6-openjdk).
    dpkg: error processing ca-certificates-java (–configure):
    subprocess installed post-installation script returned error exit status 1

    I’m trying to get the Natty Server Repo to install Sun Java, but no luck.
    How Could I make my Tomcat work??
    Any Ideas??
    It seems that it has been removed:
    sudo aptitude install sun-java6-jdk
    No candidate version found for sun-java6-jdk
    No packages will be installed, upgraded, or removed.

    Cheers, thanks for your feedback

  3. admin

    Hi there,

    While I don’t have a Natty server instance to verify with, you should be able to find a PPA out in the wild that has Sun Java, perhaps for example: http://www.ubuntugeek.com/install-jre-in-ubuntu-11-04-natty-using-ppa.html

    Since I originally wrote this, Oracle is retiring the “Operating System Distributor License” for Java (DLJ), which means Linux distributions will no longer make Oracle-Java available as native packages. Thus, your only option will be to get it from a 3rd party / PPA repo. (You can read more about this at: http://timelordz.com/wiki/Oracle_Java )

    The good news however is that OpenJDK7 will be the reference implementation, and as things progress OpenJDK7 should work quite well. You might even just want to try going that route if it fits your needs.

    Cheers,

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...