Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By stchman

Thread: how to install jdk in ubuntu

  1. #1
    jneha is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default how to install jdk in ubuntu

    I am not very friendly with Ubuntu. I have tried installing Java in ubuntu (java-6-openjdk) but it fails to install jdk. only jre is installed. on typing ;
    java -version.....I get the following at the command prompt:

    java version "1.6.0_20"
    OpenJDK Runtime Environment (IcedTea6 1.9.10) (6b20-1.9.10-0ubuntu1~10.04.2)
    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

    but javac -version shows the follwing:

    The program 'javac' can be found in the following packages:
    * openjdk-6-jdk
    * ecj
    * gcj-4.4-jdk
    * gcj-4.3
    Try: apt-get install <selected package>

    I have set the PATH variable as follows:
    usr/lib/jvm/java-1.6.0-openjdk/bin:/usr/lib/jvm/java-1.6.0-openjdk/jre

    but still can't set the jdk. Please guide.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: how to install jdk in ubuntu

    My experience with Linux is very limited, but did you try what the system advised?
    Java Code:
    sudo apt-get install openjdk-6-jdk
    Oh and never get anywhere close to gcj (aka non-Java). No idea about ecj, but OpenJDK is good.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    stchman's Avatar
    stchman is offline Member
    Join Date
    Apr 2011
    Location
    Saint Louis, Missouri
    Posts
    97
    Rep Power
    0

    Default Re: how to install jdk in ubuntu

    Excerpt:

    As of August 24th 2011, Canonical no longer have permission to redistribute new Java packages as Oracle has retired the “Operating System Distributor License for Java”.

    Luckily there are 3rd party PPAs that have Oracle Java.

    I prefer Oracle Java to OpenJDK.

    To install Oracle Java on your Ubuntu box open a terminal and type the following:

    Java Code:
    sudo apt-add-repository ppa:flexiondotorg/java
    sudo apt-get update
    sudo apt-get install sun-java6-bin sun-java6-fonts sun-java6-jdk sun-java6-jre sun-java6-plugin
    This will install the complete JRE, JDK, and browser plugin for 32 or 64 bit.
    DarrylBurke likes this.
    If you aren't programming in Java, well that's just too bad.
    I'd rather be using Ubuntu.

  4. #4
    jneha is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default Re: how to install jdk in ubuntu

    Thank you for replying ...I will try out the suggestions

Similar Threads

  1. Can't Install Ubuntu Natty Narwhal Java 7 JDK
    By kayve in forum New To Java
    Replies: 0
    Last Post: 09-16-2011, 09:45 PM
  2. RXTX Library install on Ubuntu 10.04
    By Z.K. in forum New To Java
    Replies: 0
    Last Post: 05-01-2011, 11:22 PM
  3. Replies: 0
    Last Post: 01-04-2011, 07:44 PM
  4. JDK @ ubuntu
    By M77 in forum New To Java
    Replies: 2
    Last Post: 09-16-2009, 08:43 AM
  5. SWT is not working on ubuntu
    By shreedharghare in forum SWT / JFace
    Replies: 0
    Last Post: 12-17-2008, 05:21 PM

Tags for this Thread

Posting Permissions

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