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:

1

2

3

java version"1.6.0_29"

Java(TM)SE Runtime Environment(build1.6.0_29-b11-402-11M3527)

Java HotSpot(TM)64-Bit Server VM(build20.4-b02-402,mixed mode)

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:

Manually create a JavaVirtualMachines directory under /Library/Java if it does not exist already:

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

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.

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.

20 Responses to “Install Java 1.7 Eclipse”

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

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

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

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.

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.

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.

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

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

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.