Results 1 to 10 of 10

Thread: Updating to Java 5.0

  1. #1
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Cool Updating to Java 5.0

    I'd like to use 5.0's new, funky-fresh features in Eclipse. Enlighten me, as my introductory CS course is using 5.0.
    Schultz emerged from the tub and belched.

  2. #2
    Join Date
    Nov 2004
    Location
    Taipei, Taiwan, R.O.C
    Beans
    29

    Re: Updating to Java 5.0

    SO what's the problem???

  3. #3
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Re: Updating to Java 5.0

    Well, how do I do it? I'm sorry about my first post - I'm usually pretty good about keeping them coherent. The problem is that in this class I have earned the nickname "The Sultan of Swing" because of my ability when it comes to coding, but I'm noob when it comes to Eclipse. Once I venture out beyond coding I'm pretty clueless. Go figure.
    Schultz emerged from the tub and belched.

  4. #4
    Join Date
    Aug 2005
    Location
    Bristol, England
    Beans
    52
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Updating to Java 5.0

    To install java 1.5 follow this link and scroll down to "Sun Java":
    https://wiki.ubuntu.com/RestrictedFo...ingJavaSupport

    You'll need to follow the "Selecting the default Java version" section too.
    Then fire up eclipse, and go to the Window->Preferences dialogue. Expand the "Java" branch of the tree on the left and click "Compiler", then flip "Compiler compliance level" to 5.0. Done. You can also set it on a per project basis via the Project menu.

  5. #5
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Re: Updating to Java 5.0

    Success! I've apparently reached new lows of idiocy, but it works now.
    Schultz emerged from the tub and belched.

  6. #6
    Join Date
    Jul 2005
    Beans
    1,535
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Updating to Java 5.0

    An even easier way to get the sun 1.5 SDK is to add the plf repositories to /etc/apt/sources.list
    Code:
    ## http 100mbit/s mirror provided thanks to OVH http://ovh.com
    deb http://packages.freecontrib.org/ubuntu/plf/ breezy free non-free
    deb-src http://packages.freecontrib.org/ubuntu/plf/ breezy free non-free
    then
    Code:
    sudo apt-get update
    Lastly
    Code:
    sudo apt-get install sun-j2sdk1.5
    edit: Oops, looks like I was 5 minutes too late.

  7. #7
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Re: Updating to Java 5.0

    Not at all! I spoke a bit too soon. I'll try your method.
    Schultz emerged from the tub and belched.

  8. #8
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Re: Updating to Java 5.0

    Okay, it's downloading right now. Just thought I'd mention that, when I set my default compiler in Eclipse to a v 1.5 RE in /usr/proc I can't run anything. I get a dialog box proclaiming that an exception occured while executing command line. What gives?

    EDIT: This is probably the stupidest possible question, but will the SDK serve my purposes? I just want to run crap in Eclipse with the compiler compliance set to 5.0 and not have problems.
    Last edited by Plank117; February 21st, 2006 at 01:44 AM.
    Schultz emerged from the tub and belched.

  9. #9
    Join Date
    Jul 2005
    Beans
    1,535
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Updating to Java 5.0

    Quote Originally Posted by Plank117
    Okay, it's downloading right now. Just thought I'd mention that, when I set my default compiler in Eclipse to a v 1.5 RE in /usr/proc I can't run anything. I get a dialog box proclaiming that an exception occured while executing command line. What gives?
    Why are you editing anything in /usr/proc? To set the compliance level in Eclipse just do what Keffin said "Window->Preferences dialogue. Expand the "Java" branch of the tree on the left and click "Compiler", then flip "Compiler compliance level" to 5.0."
    Quote Originally Posted by Plank117
    EDIT: This is probably the stupidest possible question, but will the SDK serve my purposes? I just want to run crap in Eclipse with the compiler compliance set to 5.0 and not have problems.
    Eclipse needs to find a SDK that supports the 5.0 features before it lets you set the compliance to 5.0. So yes, you need the SDK. You will have to tell Eclipse to use the new version of Java. To do this go to "Window->Preferences dialogue. Expand the "Java" branch of the tree on the left and click "Installed JREs". There you can add the new SUN JRE, which is part of the SDK.

  10. #10
    Join Date
    Mar 2005
    Location
    Behind the Hot Water Pipes, King's Cross, London
    Beans
    67
    Distro
    Ubuntu Breezy 5.10

    Re: Updating to Java 5.0

    Yeah. I figured out why I was having these bizarre problems. It was because I told Eclipse to search my entire /usr directory for a RE, and it would say it had found 32; I'd then stop it and try to use one of those, but the RE I had gotten by apt-getting was in /usr/lib, and Eclipse never found it because I kept stopping its search before it ever got out of /usr/proc. That probably made no sense whatsoever, since it's late and I'm having trouble forming coherent thoughts. Basically, I just hadn't looked around enough for a JRE that I'd already installed. Everything works fabulous now, and I even wrote my first GUIed Java program! Hooray!
    Schultz emerged from the tub and belched.

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
  •