Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Java 6 install

  1. #1

    Java 6 install

    Ubuntuers -

    I'm switched my Linux flavor from Fedora to Ubuntu and am have a few issues finding packages. I installed Java 5 which went well using the command

    sudo apt-get install sun-java5-jdk

    I decided to go ahead and bite the bullet for Java 6 but couldn't find a java 6 package. Here are the steps I used to install.

    download java from http://java.sun.com/javase/downloads/index.jsp
    cd to dowload directory
    chmod a+x jdk-6-linux-i586.bin
    sudo ./jdk-6-linux-i586.bin
    sudo mv jdk1.6.0 /usr/lib/jvm/
    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0/bin/java" 1
    sudo update-alternatives --set java /usr/lib/jvm/jdk1.6.0/bin/java
    java -version

    Is the the 'normal' way or is there a package out there I could have installed?

  2. #2
    Join Date
    Dec 2005
    Beans
    338

    Re: Java 6 install

    No packages yet (for either Dapper or Edgy), so you did the right thing, I think. The alternative would be to install Feisty three months before its release (and I'm not sure that has jdk6 atm).

  3. #3
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Java 6 install

    I dig your (Sun's) method. That's how I do it, and it's how many of us recommend doing it. There are packages out there though - all prepared by third parties.
    Last edited by phossal; January 28th, 2007 at 06:51 AM.

  4. #4
    Join Date
    Jan 2006
    Location
    Leuven, Belgium
    Beans
    3,414

    Re: Java 6 install

    Get the bin file from their site, extract it, move it to something like /opt/ and add these to your ~/.bashrc: (with the right path where mine mentions /opt/)
    Code:
    export JAVA_HOME=/opt/jdk1.6.0
    export PATH=${JAVA_HOME}/bin:${PATH}

  5. #5
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Java 6 install

    Quote Originally Posted by Ramses de Norre View Post
    Get the bin file from their site, extract it, move it to something like /opt/ and add these to your ~/.bashrc: (with the right path where mine mentions /opt/)
    Code:
    export JAVA_HOME=/opt/jdk1.6.0
    export PATH=${JAVA_HOME}/bin:${PATH}
    You can actually do it that^ way to any path. I often leave the Java folder on my desktop. The reason you might move it to /opt, or, /usr/lib, is to included it into your update-alternatives config.

    You left that out. You should really include those instructions.

  6. #6
    Join Date
    Jan 2006
    Location
    Leuven, Belgium
    Beans
    3,414

    Re: Java 6 install

    Quote Originally Posted by phossal View Post
    You can actually do it that way to any path. I often leave the Java folder on my desktop. The reason you might move it to /opt, or, /usr/lib, is to included it into your update-alternatives config.

    You left that out. You should really include those instructions.
    Or because I don't like directories cluttering my desktop or home folder and being accessible without root privileges. So I move all important executable stuff to /opt/ or /usr/bin/.
    And what's the advantage of including it in the update-alternatives path? I've just set the env var and I'll most likely not touch it again until a new java version is released.

  7. #7
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Java 6 install

    Quote Originally Posted by Ramses de Norre View Post
    Or because I don't like directories cluttering my desktop or home folder and being accessible without root privileges. So I move all important executable stuff to /opt/ or /usr/bin/.
    And what's the advantage of including it in the update-alternatives path? I've just set the env var and I'll most likely not touch it again until a new java version is released.
    lol Normally, I'm saying the things you say. I hardly ever configure update-alternatives. Some users like it though, because they mix techniques for installing Java programs, and some of them rely on there being an active (and current) configuration in alternatives. That's all.
    Last edited by phossal; January 28th, 2007 at 06:50 AM.

  8. #8
    Join Date
    Apr 2006
    Beans
    267
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: Java 6 install

    Quote Originally Posted by rkathey View Post
    Ubuntuers -

    I'm switched my Linux flavor from Fedora to Ubuntu and am have a few issues finding packages. I installed Java 5 which went well using the command

    sudo apt-get install sun-java5-jdk

    I decided to go ahead and bite the bullet for Java 6 but couldn't find a java 6 package. Here are the steps I used to install.

    download java from http://java.sun.com/javase/downloads/index.jsp
    cd to dowload directory
    chmod a+x jdk-6-linux-i586.bin
    sudo ./jdk-6-linux-i586.bin
    sudo mv jdk1.6.0 /usr/lib/jvm/
    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0/bin/java" 1
    sudo update-alternatives --set java /usr/lib/jvm/jdk1.6.0/bin/java
    java -version

    Is the the 'normal' way or is there a package out there I could have installed?
    Just for future reference sun-java6-<bin, jdk, plugin, source, etc> are in the multiverse repository. You can enable is with the graphic interface in Synaptic or Adept, or by editing your /etc/apt/sources.list. Make a backup first.

    You can see an example of that in the Ubuntu Customization Guide in the Third Party Projects section. There are examples there for Dapper (6.06) and Edgy (6.10).

  9. #9
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Java 6 install

    You're way behind. Most of the developers who play in the forums download Java right from Sun. I was being playful in this thread, but I wrote a tutorial that sums up Sun's method. Downloading the packages from the multiverse is okay too, but it isn't necessary. Java isn't an Ubuntu program, obviously, so no need to rely on Ubuntu to get it.

    Java
    eclipse
    Tomcat
    LimeWire
    Open Office

    They're just too easy to download. Everything except Java can simply be extracted anywhere you please. Configuring update-alternatives is a snap.

  10. #10
    Join Date
    Apr 2006
    Beans
    267
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: Java 6 install

    I was just pointing out that it's indeed in the repositories. Some of us are crazy and like package management.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •