Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Installing jdk in ubuntu 12.04 (64 bit)

  1. #1
    Join Date
    Feb 2011
    Beans
    292

    Installing jdk in ubuntu 12.04 (64 bit)

    I downloaded tar gz file of jdk and followed the instructions at:

    http://askubuntu.com/questions/55848...cle-java-jdk-7

    java or javac are not being recongnized.


    Later, I downloaded .bin file of jre.
    I used the following command:
    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jre/bin/java" 1

    The command "java" works.

    I used similar command for "javac", but it does not work i.e. javac is not recognized.

    My real question is:

    Is there a really really simple sun jdk installer for Ubuntu 12.04, which has a button named "INSTALL" and it just installs jdk?
    If there is not one, why is not there one? Should not there be one?
    What is the simplest way to install it?

    (JDK should be compatible with Netbeans 7.1.1)

  2. #2
    Join Date
    Nov 2009
    Location
    Cape Town - South Africa
    Beans
    62
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    I don't know if that helps or not, but I was having problems with java 7... due to the install problems.... I followed this and was back working!
    http://rootzwiki.com/topic/23008-how...n-ubuntu-1204/
    Hope it helps!

  3. #3
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    This way has always worked for me:
    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    Taken from:
    http://www.webupd8.org/2012/01/insta...buntu-via.html

    You will have to remove the repositories that you have added in your failed attmpt first to get this to work.
    Cheesemill

  4. #4
    Join Date
    Apr 2012
    Beans
    27

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    Quote Originally Posted by Cheesemill View Post
    This way has always worked for me:
    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    Taken from:
    http://www.webupd8.org/2012/01/insta...buntu-via.html

    You will have to remove the repositories that you have added in your failed attmpt first to get this to work.
    Thanks for posting that link I just used it to install JDK7, though im confused about why version 1.7 is called JDK7, will the actual version 7 be called JDK70 then?

  5. #5
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    Java version numbering has always been a bit odd:

    JDK5 is version 1.5
    JDK6 is version 1.6
    JDK7 is version 1.7
    Cheesemill

  6. #6
    Join Date
    Feb 2011
    Beans
    491
    Distro
    Ubuntu

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    Is there a PPA for Oracle Java 6 as well? I tried the webupd8 ppa, but I found out that I need Java 6 instead :/

  7. #7
    Join Date
    Oct 2008
    Beans
    2

    Arrow Re: Installing jdk in ubuntu 12.04 (64 bit)

    I've just executed

    Code:
    #apt-get install openjdk-7-jdk
    Code:
    #java -version
    
    java version "1.7.0_03"
    OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu2)
    OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
    
    #javac -version
    
    javac 1.7.0_03

  8. #8
    Join Date
    Feb 2011
    Beans
    491
    Distro
    Ubuntu

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    @mcmorry: That's OpenJDK, not Oracle Java.

  9. #9
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    The webupd8 ppa mentioned about is the way to go for Java 7. When a new update comes out, your system will be updated - i.e.: when Update 5 comes out, you'll get it.

    For Java 6, I recommend this tutorial:

    http://sites.google.com/site/easylinuxtipsproject/java

    But that only gets the JRE. If you want the JDK, you can download it from Oracle/Sun and just follow the directions for installing it in the same directory.

    However, EOL for Java 6 is November 2012. Installing Java 7 would be a good idea. Some apps my not have caught up, but you can install both and just update your alternatives as needed. Eventually, everyone will have to migrate to Java 7.
    Last edited by QIII; May 1st, 2012 at 06:45 PM.
    Please read The Forum Rules and The Forum Posting Guidelines
    My Blog
    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  10. #10
    Join Date
    Feb 2011
    Beans
    491
    Distro
    Ubuntu

    Re: Installing jdk in ubuntu 12.04 (64 bit)

    Quote Originally Posted by QIII View Post
    The webupd8 ppa mentioned about is the way to go for Java 7. When a new update comes out, your system will be updated - i.e.: when Update 5 comes out, you'll get it.

    For Java 6, I recommend this tutorial:

    http://sites.google.com/site/easylinuxtipsproject/java

    But that only gets the JRE. If you want the JDK, you can download it from Oracle/Sun and just follow the directions for installing it in the same directory.

    However, EOL for Java 6 is November 2012. Installing Java 7 would be a good idea. Some apps my not have caught up, but you can install both and just update your alternatives as needed. Eventually, everyone will have to migrate to Java 7.
    Thanks! I do know about the tutorial you mentioned, but I know that there were PPA's available for 11.10. In addition to the PPA's out there, Mint does also have Java 6 in their repos for Mint 12.

    Unfortunately Java 7 didn't work with my online banking system.

    How do you switch between Java 6 and 7 if you have both installed?

Page 1 of 2 12 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
  •