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

Thread: How to install javac in ubuntu 10.04

  1. #1
    Join Date
    Jun 2010
    Beans
    154

    How to install javac in ubuntu 10.04

    Hi guys, I would appreciate if someone explains me from scratch and in detailed how can I install javac. I'm new with linux so please be specific in what to do. I found one post saying something about adding extra repositories but I don't know what repositories, where to add them, how to add them......Anyway, hope to hear from someone.

    Thanks

  2. #2
    Join Date
    Mar 2010
    Location
    Dublin, Ireland
    Beans
    Hidden!
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How to install javac in ubuntu 10.04

    I didn't have to add any new repositories, I installed it by:

    1. Go to System > Administration > Synaptic Package Manager
    2. Type sun in the Quick Search box
    3. Mark: sun-java6-javadb, sun-java6-jre, sun-java6-jdk for installation
    4. Click Apply


    If you're looking for a different version of java, then just type javac in the Quick Search box, and install one of the environments that Synaptic returns.
    Matt
    blog.mattrudge.net for extra helpings of geeky Ubuntu goodness
    Get the Ubuntu Weekly Newsletter

  3. #3
    Join Date
    Jun 2010
    Beans
    154

    Re: How to install javac in ubuntu 10.04

    I tried that and it doesn't show none of those three packages,sun-java6.... none of those are in the synaptic package manager....what can I do??

  4. #4
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,570
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to install javac in ubuntu 10.04

    Open System-Administration-Software Sources and check which repositories are enabled (selected). The top two or three should be at least. If they are not, select them.

    After that search again in Synaptic for sun-java6-jdk, that is the main package for development. javac is only the executable compiler name. The JDK, Java Development Kit is what you need for compiling applications.

    The JRE is usually installed by default, that's the Runtime Environment you need for running java programs/apps, even the ones included on websites.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  5. #5
    Join Date
    Jun 2010
    Beans
    154

    Re: How to install javac in ubuntu 10.04

    Actually the top four are selected, which are..

    Canonical-supported Open Source software (main)
    Community-maintained Open Source software(universe)
    Proprietary drivers for devices(restricted)
    Software restricted by copyright or legal issues(multiverse)

    The one that is not selected is Source code

    should i select it?? if not what can I do??

  6. #6
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,570
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to install javac in ubuntu 10.04

    Are you sure there is no sun-java6-jdk in Synaptic?

    Open terminal and run:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install sun-java6-jdk
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  7. #7
    Join Date
    Jun 2010
    Beans
    154

    Re: How to install javac in ubuntu 10.04

    Yes I'm positive these are the ones related to java that are in the synaptic package manager.

    java-package
    javacc
    jacacc-doc
    sun-javadb-client
    sun-javadb-common
    sun-javadb-core
    sun-javadb-demo
    sun-javadb-doc
    sun-javadb-javadoc

    I did what you told me to do and I got this message

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package sun-java6-jdk is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package sun-java6-jdk has no installation candidate

    I hope you guys could help me out

  8. #8
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,570
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to install javac in ubuntu 10.04

    You can download it from here:
    http://java.sun.com/javase/downloads/widget/jdk6.jsp

    And I just remembered, Sun got bought by Oracle so maybe it's not called sun any more. Try in Synaptic with just 'java jdk' and see which packages it offers.

    Alternatively use the download link above, just select your OS and download the file. You will have to install it, depending what type of file it is.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  9. #9
    Join Date
    Jun 2010
    Beans
    154

    Re: How to install javac in ubuntu 10.04

    I downloaded the bin file from that website, then I executed it in my usr/local

    I accepted the terms, and a directory named jdk1.6.0_20 was created.

    But when I try
    > javac programName.java

    It tells me

    "javac: Command not found."

    What am I missing?

  10. #10
    Join Date
    Jan 2010
    Beans
    16

    Re: How to install javac in ubuntu 10.04

    Actually Lucid has ditched sun jdk in its release and has opted to go with openjdk..so if u want to install sun jdk, just do the following.


    - Open up /etc/apt/sources.list in your favourite text editor. Add the following line at the bottom of the page:

    deb http://archive.canonical.com/ lucid partner

    Then run:

    Code:
    sudo apt-get update

    After updating the repo, just run the following command:
    Code:
    sudo apt-get install sun-java6-jre sun-java6-plugin  sun-java6-fonts sun-java6-jdk

    Thats it..we're done






    Cheers

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
  •