Page 1 of 13 12311 ... LastLast
Results 1 to 10 of 128

Thread: Install Java's JDK and Eclipse for performance and ease

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

    Install Java's JDK and Eclipse for performance and ease

    INSTALLING JAVA (JDK/JRE)
    Here is the updated version used to install Java's JDK 6u1 on Edgy. The method doesn't use packages, opting to use Sun's .bin file instead. Visit java.sun.com to download their .bin file. You probably want: jdk-6u1-linux-i586.bin.

    STEP: Download it to your desktop. Once it's fully downloaded, open a command prompt and execute it like so:
    Code:
    cd ~/Desktop
    sudo chmod +x *.bin
    sudo sh ./jdk*.bin
    STEP: Executing the .bin file creates a folder on your desktop named jdk1.6.0_01. Rename that folder to Java6u1. Now move that folder to /usr/lib

    Code:
    sudo mv Java6u1 /usr/lib
    STEP: Now add Java to update-alternatives and make it the default like so:

    Code:
    sudo update-alternatives --install /usr/bin/java java /usr/lib/Java6u1/bin/java 300
    sudo update-alternatives --config java
    STEP: Don't forget your Java plugin

    Code:
    sudo ln -s /usr/lib/Java6u1/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins




    INSTALLING ECLIPSE
    Download eclipse directly from eclipse.org. You probably want: eclipse-SDK-3.2.2-linux-gtk.tar.gz

    STEP: Download the file to your desktop. Right-click and extract it. Move it to the directory of your choice. (I use /usr/lib)

    STEP: Add links to /usr/bin (edit your paths as necessary):

    Code:
    sudo update-alternatives --install /usr/bin/eclipse eclipse /usr/lib/eclipse/eclipse 300
    sudo ln -s /usr/lib/eclipse/startup.jar /usr/bin
    STEP: Add eclipse to the menu:

    Right-click Applications -> Edit Menus -> Programming -> New Item ->
    Icon: /usr/lib/eclipse/icon.xpm
    Name: eclipse
    Comment: Launch eclipse
    Command: eclipse





    INSTALLING NETBEANS

    STEP: Grab the Netbeans Tarball (Netbeans-5_5.tar.gz) from netbeans.org. Save it to your desktop. Right-click and extract it.

    STEP: Move it to /usr/lib/netbeans
    Code:
    cd ~/Desktop
    sudo mv netbeans /usr/lib/
    STEP: Add links to /usr/bin (Edit your paths as necessary):
    Code:
    sudo update-alternatives --install /usr/bin/netbeans netbeans /usr/lib/netbeans/bin/netbeans 300
    STEP: Add netbeans to the menu:

    Right-click Applications -> Edit Menus -> Programming -> New Item ->
    Icon: /usr/lib/netbeans/nb5.5/netbeans.png
    Name: netbeans
    Comment: Launch Netbeans
    Command: netbeans


    ---------------------------------------------------------------------------------
    The java packages do, in fact, still use the .bin file from SUN. They're just additional wrappers. By installing using the method above, you're able to install multiple JDK's, which can be set as defaults using update-alternatives --config. In addition, you can install older versions of the JDK, which are all available at the SUN site for Java.
    Last edited by phossal; April 15th, 2007 at 02:26 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    Aalborg
    Beans
    6
    Distro
    Ubuntu 6.06 Dapper

    Re: Install Java's JDK and Eclipse for performance and ease

    I followed your guide, but when i type

    Code:
    java -version
    Then it's still ver. 1.4

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

    Re: Install Java's JDK and Eclipse for performance and ease

    Removed
    Last edited by phossal; February 20th, 2007 at 05:53 AM.

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

    Re: Install Java's JDK and Eclipse for performance and ease

    Removed
    Last edited by phossal; February 20th, 2007 at 05:53 AM.

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

    Re: Install Java's JDK and Eclipse for performance and ease

    Removed
    Last edited by phossal; February 20th, 2007 at 05:53 AM.

  6. #6
    Join Date
    Aug 2005
    Beans
    8

    Re: Install Java's JDK and Eclipse for performance and ease

    Hello-

    I too am experiencing the problem of not being able to open Eclipse from the apps menu and getting the error:

    A Java Runtime Environment (JRE) or Java Development Kit (JDK)
    must be available in order to run Eclipse. No Java virtual machine
    was found after searching the following locations:
    /usr/lib/j2sdk1.4-sun/bin/java

    But I am able to open Eclipse from the command line.

    Forgive me, but I still didn't get the solution for this. I have followed phossal's well-presented tutorial so far, including making the changes to ./bashrc....but still no luck.

    Any ideas on where to go from here?

    Thanks

    bbgun

  7. #7
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Install Java's JDK and Eclipse for performance and ease

    Ed.
    Last edited by qpwoeiruty; January 30th, 2007 at 12:46 AM. Reason: phossal rocks :)

  8. #8
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Install Java's JDK and Eclipse for performance and ease

    I know that I got mine by Synaptic before I installed any java which is how i got the problem I think.

    Plus, you can simply add a line to /etc/jvm that points to the JDK.
    ???
    I assume this is the better way but I don't understand what to add to the file.

    Sorry, it's really interesting learning but Linux is still in the voodoo stages for me
    Last edited by qpwoeiruty; January 29th, 2007 at 05:08 PM. Reason: edited for [Edited]

  9. #9
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Install Java's JDK and Eclipse for performance and ease

    Thank you phossal for the awesome HowTo, it was exactly what I was looking for. Regarding your method for making the jar files work when double clicked, does that work for only one file or does it set all the jar files to be doubl-clickable? If not, is it possible to create a ".mime.types" file in the home directory and have something like: "application/java jar"? Thanks!

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

    Re: Install Java's JDK and Eclipse for performance and ease

    My experience indicates all files.

Page 1 of 13 12311 ... 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
  •