Install Java 1.7 Eclipse

Eclipse IDEI’m beginning a new Java tutorial using Eclipse as my IDE. Every time I have used Eclipse in the past there have been installation problems so, I’ll try to fix that issue here.

I use Eclipse because in my opinion it is the best free IDE available.

Also note that I’ll provide Java 1.7 installation steps for PCs, but Java 1.6 & 1.7 steps for MACs. The reason why I’m doing that is because Java 1.7 isn’t quite ready yet for Eclipse on MACs.

Don’t worry, there isn’t that much of a difference between Java 1.6 and 1.7. At least for a beginner tutorial.

Checking Your Version of Java

Java 1.6 has been around since December 2006, so chances are you already have it installed on your computer. To find out type the following in either your Terminal (MACs), or Command Line (PCs) java -version

When you do you’ll probably see the following:

Install Java 1.7 MACs

If you don’t have Java 1.6 installed for Mac go here to get it. You can get a preview release of Java 1.7 for Mac here.

Here are the instructions on how to install it from Oracle:

  1. Manually create a JavaVirtualMachines directory under /Library/Java if it does not exist already:
  2. Download the Oracle JDK7 Mac OS X Port DMG file
  3. Open the DMG file by double clicking on it
  4. Drag the JDK 1.7.0 Developer Preview icon to the JavaVirtualMachine icon
Install Eclipse Java 1.6 & 1.7 for Macs
Now that you have Java setup on your Mac, it is time to set up Eclipse. Go here to download the Eclipse IDE for Java Developers.
After you install Eclipse you have to set it up to work with Java.
  • Execute Eclipse and then click on Elipse and  Preferences in the top menu
  • Expand the list item named Java and click Installed JREs
  • Click the Add… button
  • Java 1.6 should be set as the default
  • If not select Standard VM in the JRE Popup Window
  • Type /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home into JRE home
  • Type Java1.6 as the name
  • Click Finish
Do the same for Java 1.7, except leave 1.6 as the default and also instead enter Java1.7 for the name and the following for the JRE home /Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home
You’re done and ready to use Java 1.6 & 1.7 in Eclipse
Install Java 1.7 PCs
For PCs go here to download Java 1.7 unless you already have it installed. Make sure you download the JDK and not the JDE. Find the Java executable you just downloaded and double click it. Follow the prompts to install it.
The Java files will be located at C:\Program Files\Java\jdk1.7.0 after installation.
Install Eclipse Java 1.7 for PCs
To get Eclipse to work on PCs is nearly identical to the MAC installation. Go here to download the Eclipse IDE for Java Developers.
After you install Eclipse you have to set it up to work with Java.
  • Execute Eclipse and then click on Windows and  Preferences in the top menu
  • Expand the list item named Java and click the Compiler option (Don’t Expand it)
  • Check if Compiler Compliance Level is set to 1.7
  • If it isn’t change it to 1.7 in the dropdown
  • Click on Installed JREs and if you see jre6 as checked you’re done
  • If jre6 isn’t checked click the Add… button
  • Select Standard VM in the JRE Popup Window
  • Under Directory select the home directory for JRE 1.7 (See Above)
  • Click Finish
Eclipse Code Completion for Java 1.7
To set up code completion for Java 1.7 in Eclipse just open your preferences folder, click on Compiler, and set Compiler Compliance Level to 1.7. This currently isn’t working for MACs, but should work soon. If you have a PC this will work. See image below to better understand the change.
Java Compliance Eclipse
That’s All Folks
I hope this tutorial helps you to easily install Eclipse, so you can use it to learn java. Leave any questions below.
Till Next Time

20 Responses to “Install Java 1.7 Eclipse”

  1. supprof1 says:

    That’s perfect to me. it coudn’t be better because i was wondering witch application language i have to learn to make somme counting applications. i found that java was the perfect language and quiet frankly i was going to ask you witch to help me choise betwen android and java or purpose to me another language to made some pc applications.
    i am a lucky gay derek to know you.
    sometimes it is enough that I think of something for you to give me the answer. i am in.
    thank you very mutch derk

    • admin says:

      Java is pretty much the language of choice for developing applications for any OS. I’m not sure what I’m going to do. I basically want to try and cover the basics in an understandable way.

      I’m lucky to know you too :)

      • Joe says:

        You are such a great blessing …Keep up the good works …may God bless all that you do and always give you continous success…Thanksssssssssssssssssssssssssssssssssssssssssssssssssssssssss a loooooooooooooooooottttttttttt for everything

  2. roshik says:

    thanks, bro would u please help us to know about visual basic programming?

  3. roshik says:

    is it possible to make a chat application with php ?

  4. bruce says:

    I don’t know which version of Eclipse to download. There are many. Which one are you using?

    • admin says:

      Actually most will work because Eclipse works with Java out of the box. Either Eclipse IDE for Java Developers, or Eclipse Classic works though. Of course pick the one that works with your operating system here Eclipse Download

  5. matt says:

    Why when I goto … File> new I get ?
    Thanks for a responce.

  6. matt says:

    Sorry… even entering comments produces errors…

    I recently downloaded Eclipse ee for java developers. I am only using 1.6. I dont see a need to hassle with 1.7 due to my newness of programming.

    When I go to… File>New, the list is blank and shows

    I cant assume i have done anything wrong because I just installed it and have not messed with anything.

    Should have posted here…

    thanks,
    Matt

  7. Edmond says:

    May I please request your kind help with installing Eclipse on Ubuntu 12.10 32-bit. I resorted to a Linux distro because my PC repeatedly chrashed under Windows XP Home Edition. I am most grateful for your kind help and advice.

    • admin says:

      What errors are you seeing? If you are trying to use the newest version of Eclipse (Juno) that may be the issue. Try to use Eclipse Indigo instead. That is what I use

      • Edmond says:

        I tried downloading the file eclipse-java-indigo-SR2-linux-gtk.tar.gz.part twice. Each time the error said that it could not be saved. I checked that that the file size donloaded was 128.9 MB. The extraction of this file failed, but the error was not specified. Kindly advise, if possible to help me continue jearning Java from your most excellent quality tutorials.

  8. Edmond says:

    Thank you very much for your most kind help with the Eclipse download. Your instructions have worked well giving me the much needed chance to put in some practise. I am practising with your very helpful code from Tutorials 1, 2, and 3. Sometimes Eclipse detects dead code, though it compiles and runs as expected. Thank you once again for your highly considerate Java Tutorials anlong with your continual help.
    Good wishes to you and best regards, too.

    • admin says:

      You’re very welcome :) I’m glad I was able to help. It seems like the new version of Eclipse (Juno) is causing headaches. Most of those issues seem to go away if you use the previous version Indigo. Either way since you got it working I’m happy

  9. Vinu says:

    Hi Derek, First of all thanks a lot for all the great Videos and articles, Your explanations are crisp, clear and to the point.. Keep doing the great work.. Now my question is – I’m an professional .NET developer and planning to do some unofficial projects in JAVA, Android and IOS. Am also planning to make a switch from PC to MAC for my JAVA projects, Am planning to buy a MAC Book Pro, since i’m new to MAC i feel difficult to settle into MAC configuraiton..What do you think is the ideal configuration for a Developers MAC Book pro? Eventually i may also start using it for professional and consultation purpose

    • Derek Banas says:

      Hi,

      You’re very welcome :) I personally could never do what I do on a laptop, but my work may be very different from yours. I use a 27″ iMac and it has made me extremely productive. Very often I have to maintain inventory while taking notes and monitoring data in a browser. I can easily do this and much more on a desktop.

      If you normally only do one thing at once, or value portability over all else then a laptop is the way to go for you.

      As per moving toward Macs for development I personally haven’t upgraded my osX because the os is becoming more of a toy versus the amazing development tool that it once was.

      Just some personal opinions. I hope they help :)
      Derek

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Google+