DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Installing and Configuring NetBeans IDE 7.1.2 and the Java JDK 1.7 on OS X

Installing and Configuring NetBeans IDE 7.1.2 and the Java JDK 1.7 on OS X

Chad Lung user avatar by
Chad Lung
·
May. 24, 12 · Java Zone · Interview
Like (0)
Save
Tweet
21.79K Views

Join the DZone community and get the full member experience.

Join For Free

Recently Oracle released the JDK 1.7 for OS X (download here). This is a JDK release as of the time of this article and a consumer version of the JRE 1.7 will be released later in 2012. Today I’m going to walk through how you can install and configure the new JDK 1.7 on OS X as well as how to take advantage of it in NetBeans IDE 7.1.2.

If you have NetBeans IDE 7.1 already installed then make sure to run the update and get it running on version 7.1.2 or above.

Note: Oracle’s install docs are located here: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html

You need to be running OS X Lion 10.7.2 or newer to install the new JDK 1.7.

Download the JDK 1.7 for OS X here. Once that is downloaded you double click the dmg file to begin walking through the guided installation process.

Once the installer finishes you will find the new JDK 1.7 located in the following folder: /Library/Java/JavaVirtualMachines/

Inside of that location you’ll see a file called 1.7.0.jdk. Double-click that file so you can set your preference to the JDK 1.7 on your system. Simply drag the JDK 1.7 to the top.

Once that is done go into the Terminal and run the following command:

$ java -version

You should now see the version coming back as Java 1.7 etc.

For NetBeans IDE 7.1.2 you need to go into the following menu item: Tools -> Java Platforms

A dialog will open allowing you to add another JDK version. Press the Add Platform button and another dialog will open. The new JDK should already be present in the next dialog so you just need to navigate down to: 1.7.0.jdk/contents/home and then press Next.

Step through the wizard and exit out of the dialog. JDK 1.7 should now be available to your Java projects.

To switch a NetBeans IDE project to the new JDK 1.7 make sure to right-click on the project in the Projects window. In the project properties dialog you can drill into the Build -> Compile option and then select the Java platform you want. Also note the Compile on Save option, set that as you need to.

Thats it, you should now be using the JDK 1.7 on OS X and NetBeans IDE. Kudos to Oracle for making this a very pleasant experience on OS X.

 

Java (programming language) Java Development Kit Integrated development environment NetBeans

Published at DZone with permission of Chad Lung, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 5 Steps to Strengthen API Security
  • Unit Vs Integration Testing: What's the Difference?
  • How To Integrate Third-Party Login Systems in Your Web App Using OAuth 2.0
  • How to Test JavaScript Code in a Browser

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo