Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54

Thread: HowTo:How to Install Java in Ubuntu/Kubuntu

  1. #1
    Join Date
    Apr 2007
    Beans
    3

    HowTo:How to Install Java in Ubuntu/Kubuntu

    This tut will allow you to install a java environment that will allow you to run apps on your firefox/konqueror.

    We will now install the following Java packages
    sun-java6-bin - Contains the binaries
    sun-java6-demo - Contains demos and examples
    sun-java6-doc - Contains the documentation
    sun-java6-fonts - Contains the Lucida TrueType fonts from the JRE
    sun-java6-jdk - Contains the metapackage for the JDK
    sun-java6-jre - Contains the metapackage for the JRE
    sun-java6-plugin - Contains the plug-in for Mozilla-based browsers
    sun-java6-source - Contains source files for the JDK

    Installing the Java Runtime Environment

    1) In terminal, enter the following command:
    Code:
    sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    2) Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue. You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.


    Aftermath:


    First, check that the JRE is properly installed by running the following command from a terminal.
    java -version
    You should get similar output
    java version “1.6.0″
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

    Making sure java works on Firefox:

    Open Firefox and type
    Code:
    about:plugins
    in the address bar and check for java plugin.

    Making sure Java works on Konqueror

    Go to any website that uses a java applet and see if it runs. If it doesn't run, click
    Code:
    Tools
    in the Konqueror top bar, go to
    Code:
    HTML Settings
    and make sure the "Java" option is ticked.


    Feel free to post any questions.

  2. #2
    Join Date
    Apr 2007
    Location
    Hawaii
    Beans
    32
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    This is my output:

    steven@steven-desktop:~$ java -version
    java version "1.4.2"
    gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)

    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    steven@steven-desktop:~$

    But when i try to apt-get the new one, it says I have the most recent version.

    Any ideas? =)

    Steven Rushing

  3. #3
    Join Date
    Nov 2005
    Location
    London
    Beans
    85
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    here is the original article http://www.ubuntugeek.com/how-to-ins...in-ubuntu.html

    Quote Originally Posted by Gmaster1440 View Post
    This tut will allow you to install a java environment that will allow you to run apps on your firefox/konqueror.

    We will now install the following Java packages
    sun-java6-bin - Contains the binaries
    sun-java6-demo - Contains demos and examples
    sun-java6-doc - Contains the documentation
    sun-java6-fonts - Contains the Lucida TrueType fonts from the JRE
    sun-java6-jdk - Contains the metapackage for the JDK
    sun-java6-jre - Contains the metapackage for the JRE
    sun-java6-plugin - Contains the plug-in for Mozilla-based browsers
    sun-java6-source - Contains source files for the JDK

    Installing the Java Runtime Environment

    1) In terminal, enter the following command:
    Code:
    sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    2) Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue. You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.


    Aftermath:


    First, check that the JRE is properly installed by running the following command from a terminal.
    java -version
    You should get similar output
    java version “1.6.0″
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

    Making sure java works on Firefox:

    Open Firefox and type
    Code:
    about:plugins
    in the address bar and check for java plugin.

    Making sure Java works on Konqueror

    Go to any website that uses a java applet and see if it runs. If it doesn't run, click
    Code:
    Tools
    in the Konqueror top bar, go to
    Code:
    HTML Settings
    and make sure the "Java" option is ticked.


    Feel free to post any questions.

  4. #4
    Join Date
    Apr 2007
    Location
    CANADA
    Beans
    10
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    I have looked and looked and I have not seen an post regarding my following question, so please forgive me if I overlooked something. When I try to install java it always come up to this right here....
    The file should be owned by root.root and be copied
    to /tmp.

    [Press RETURN to try again, 'no' + RETURN to abort] dpkg: error processing sun-java6-doc (--configure):
    subprocess post-installation script killed by signal (Interrupt)
    Errors were encountered while processing:
    sun-java6-doc
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    What is this and how do I get past this ?

  5. #5
    Join Date
    Jun 2006
    Location
    The Netherlands
    Beans
    2,185
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    Quote Originally Posted by stevenrushing View Post
    This is my output:

    steven@steven-desktop:~$ java -version
    java version "1.4.2"
    gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)

    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    steven@steven-desktop:~$

    But when i try to apt-get the new one, it says I have the most recent version.

    Any ideas? =)

    Steven Rushing
    You might need to make Sun Java the default by running the following command:
    Code:
    sudo update-alternatives --config java
    and selecting Sun Java.

  6. #6
    Join Date
    Mar 2006
    Location
    Eefde, The Netherlands
    Beans
    432
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    Quote Originally Posted by naughtywill View Post
    I have looked and looked and I have not seen an post regarding my following question, so please forgive me if I overlooked something. When I try to install java it always come up to this right here....
    What is this and how do I get past this ?
    Somehow the quoting got mangled a bit, but these are the messages/instructions mentioned:
    Code:
    Selecting previously deselected package sun-java6-doc.
    (Reading database ... 134351 files and directories currently installed.)
    Unpacking sun-java6-doc (from .../sun-java6-doc_6-00-2ubuntu2_all.deb) ...
    Setting up sun-java6-doc (6-00-2ubuntu2) ...
    This package is an installer package, it does not actually contain the
    JDK documentation.  You will need to go download one of the
    archives:
    
        jdk-6-doc.zip jdk-6-doc-ja.zip
    
    (choose the non-update version if this is the first installation).
    Please visit
    
        http://java.sun.com/javase/downloads/
    
    now and download.  The file should be owned by root.root and be copied
    to /tmp.
    
    [Press RETURN to try again, 'no' + RETURN to abort]
    So you should do what it says:

    Go to http://java.sun.com/javase/downloads/ and click on the "Download" button next to "Java SE 6 Documentation".

    In the new page, click on the 'Accept License Agreement' radio button.

    Now click on the package you want (English or Japanese) and save it somewhere in your home directory or on your Desktop.

    Open a new terminal emulator and (assuming you've downloaded the package to your Desktop), do:
    Code:
    sudo cp Desktop/jdk-6-doc.zip /tmp
    You can then continue with the installation (by pressing enter in the terminal emulator with apt-get/aptitude running, or Synaptic): the installer doesn't give a lot of feedback, but you should see something similar to this:
    Code:
    /tmp/jdk-6-doc.zip has been unpacked and installed.
    You can now delete it, if you wish.
    Which means everthing went well. You don't have to remove the package from /tmp yourself, it'll get deleted on your next boot anyway.
    "When in doubt, use brute force."

    -- Ken Thompson

  7. #7
    Join Date
    Mar 2007
    Location
    New Orleans, LA
    Beans
    15

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    I installed all of the packages that you suggested and I still can't get Java working. I'm running Feisty and Firefox 2.0.0.3 (I believe).

    When I run "java -version" I get back:
    Code:
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
    So, I know that Java 1.6.0 is installed... and when I run "sudo update-alternatives --config java", it is set to the following:
    Code:
    *         1    /usr/lib/jvm/java-6-sun/jre/bin/java.
    So, Java should be configured properly. However, java will NOT work in firefox. When I look in "aboutlugins", NOTHING is listed.

    Any ideas?

  8. #8
    Join Date
    Jun 2006
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    What is the install path for Java 1.6 in Gnome? I need to know in order to initiate initiate Java in Konqueror.

  9. #9
    Join Date
    Mar 2007
    Beans
    3

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    after installing the java-doc, where can I access it? where is index.html in the doc dir?


    Quote Originally Posted by Compyx View Post
    Somehow the quoting got mangled a bit, but these are the messages/instructions mentioned:
    Code:
    Selecting previously deselected package sun-java6-doc.
    (Reading database ... 134351 files and directories currently installed.)
    Unpacking sun-java6-doc (from .../sun-java6-doc_6-00-2ubuntu2_all.deb) ...
    Setting up sun-java6-doc (6-00-2ubuntu2) ...
    This package is an installer package, it does not actually contain the
    JDK documentation.  You will need to go download one of the
    archives:
    
        jdk-6-doc.zip jdk-6-doc-ja.zip
    
    (choose the non-update version if this is the first installation).
    Please visit
    
        http://java.sun.com/javase/downloads/
    
    now and download.  The file should be owned by root.root and be copied
    to /tmp.
    
    [Press RETURN to try again, 'no' + RETURN to abort]
    So you should do what it says:

    Go to http://java.sun.com/javase/downloads/ and click on the "Download" button next to "Java SE 6 Documentation".

    In the new page, click on the 'Accept License Agreement' radio button.

    Now click on the package you want (English or Japanese) and save it somewhere in your home directory or on your Desktop.

    Open a new terminal emulator and (assuming you've downloaded the package to your Desktop), do:
    Code:
    sudo cp Desktop/jdk-6-doc.zip /tmp
    You can then continue with the installation (by pressing enter in the terminal emulator with apt-get/aptitude running, or Synaptic): the installer doesn't give a lot of feedback, but you should see something similar to this:
    Code:
    /tmp/jdk-6-doc.zip has been unpacked and installed.
    You can now delete it, if you wish.
    Which means everthing went well. You don't have to remove the package from /tmp yourself, it'll get deleted on your next boot anyway.

  10. #10
    Join Date
    Sep 2006
    Beans
    34

    Re: HowTo:How to Install Java in Ubuntu/Kubuntu

    I installed the sun-java6-jre and -jdk packages, but when I type java -version I get
    The program 'java' can be found in the following packages:
    * j2re1.4
    * gij-4.1
    * kaffe
    * jamvm
    * java-gcj-compat
    * cacao
    * sablevm
    Try: sudo apt-get install <selected package>
    Make sure you have the 'universe' component enabled
    bash: java: command not found
    I also tried the update-alternatives thing, it didn't help.

    The javac command seems to work just fine, though.


    Edit: the following command fixed it:
    update-java-alternatives --set java-6-sun
    I found that in /usr/share/doc/sun-java6-bin/README.alternatives
    Last edited by haloedrain; May 20th, 2007 at 07:43 PM. Reason: I fixed my own problem

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