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.
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.
SO what's the problem???
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.
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.
Success! I've apparently reached new lows of idiocy, but it works now.
Schultz emerged from the tub and belched.
An even easier way to get the sun 1.5 SDK is to add the plf repositories to /etc/apt/sources.listthenCode:## 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
LastlyCode:sudo apt-get update
edit: Oops, looks like I was 5 minutes too late.Code:sudo apt-get install sun-j2sdk1.5
Not at all! I spoke a bit too soon. I'll try your method.
Schultz emerged from the tub and belched.
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.
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."Originally Posted by Plank117
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.Originally Posted by Plank117
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