Why there is no sun-java in Debian Wheezy and how can I fix this?

4

0

Sun's java is in Debian Lenny and Debian Squeeze repos (non-free) but no in wheezy1,2. Why?

edit: after further research I found that java has been removed. reson:

ROM; security issues and newer versions cannot be redistributed 3

The following question remains:

Where do I get sun-java packages for Debian Wheezy?

seler

Posted 2011-12-15T20:50:27.980

Reputation: 303

it's funny that while googling one of the first results is this page

– seler – 2011-12-15T22:04:49.003

SU indexes quickly! :D – Garrett – 2011-12-15T22:14:03.307

Answers

3

I am not sure that it is because of licensing reasons, since the Sun/Oracle Java is in both Squeeze and Sid.

If you need Sun/Oracle Java on Wheezy, the easiest way is probably to install the Squeeze or Sid version. You can make apt to do that for you by pinning.

Pinning allows you to run certain packages from one version (stable, testing, unstable) without the necessity of upgrading your entire system.

I don't do that at the moment, since I find the opendjk packages adequate for all I need, but I did use pinning in the past for number of other packages.

Jan Hlavacek

Posted 2011-12-15T20:50:27.980

Reputation: 1 175

Is's been removed in sid. – seler – 2011-12-15T22:14:12.040

Packages from Squeeze are working. – seler – 2011-12-15T22:25:38.260

4

In http://wiki.debian.org/Java there is a link to a helper to generate debian packages from upstream tarballs.

This is maybe the best answer: generating a package each time the people at Oracle generate a new version, but I prefer a different one: having a package with scripts to do the tedious task of installing from a tar.gz.

This is why I have generated a package that does not contain the java framework, but which tells the system just the contrary.

In this way I can upgrade just by manually downloading the tar.gz and running an script.

I know that the package and the script can be improved, but for me is more than enough. It works in i386 and amd64.

If you wanna try it you can download it from http://babel.ls.fi.upm.es/~vpablos/others/packages/debian/

Victor

Posted 2011-12-15T20:50:27.980

Reputation: 41

1

I don't know the right way to install sun-java, but this is my (not so good) solution for Wheezy.

In this example, my Java version is JDK 64 bit.

  1. Download jdk-6u30-linux-x64.bin from www.oracle.com

  2. Extract jdk-6u30-linux-x64.bin to /usr/lib/jvm

    cp jdk-6u30-linux-x64.bin /usr/lib/jvm
    cd /usr/lib/jvm
    chmod 777 jdk-6u30-linux-x64.bin
    ./jdk-6u30-linux-x64.bin
    rm jdk-6u30-linux-x64.bin
    
  3. Create a symbolic link to the new directory /usr/lib/jvm/jdk1.6.0_30

    ln -s /usr/lib/jvm/jdk1.6.0_30 /usr/lib/jvm/java-sun
    

    (This will save time for the next updates. Just remove the link /usr/lib/jvm/java-sun and create the new symbolic link.)

  4. Create symbolic links for the web browser:

    ln -s /usr/lib/jvm/java-sun/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/javaplugin.so
    

    Test with a web browser pointing to www.java.com

    rm /usr/bin/java
    ln -s /usr/lib/jvm/java-sun/bin/java /usr/bin/java
    rm /usr/bin/javac
    ln -s /usr/lib/jvm/java-sun/bin/javac /usr/bin/javac
    

    and so on..

Hope you find a better solution.

b-user

Posted 2011-12-15T20:50:27.980

Reputation: 11

1

Use java-package to build a deb from the upstream tarballs, as explained in the Debian wiki Java/Sun page.

user1338062

Posted 2011-12-15T20:50:27.980

Reputation: 727

0

You can try to install the packages for Ubuntu.

You can get them here (edited).

Currently sun-java is in the partner repository, not in the multiverse as it was previously.

You will notice that there is no version for Ubuntu 11.10. Same problem as with Debian, I think.

jap1968

Posted 2011-12-15T20:50:27.980

Reputation: 827

Sorry, they're not working :/ – seler – 2011-12-15T21:59:47.180

You are right. Edited to put the correct link. – jap1968 – 2011-12-15T22:30:37.233