Maclord's Blog

Tips and tricks about Macs, Mac OS X, iOS and cross-platform working
    • English
    • Français
    • Türkçe
  • Home
  • About Maclord’s Blog
  • Mac Basics
  • Downloads
  • Contact Maclord
  • Privacy Policy

How to Install Java (and JDK) on Mac OS X Lion

Thursday February 9th, 2012

Java for Mac OS X LionOne of my favorite things on the Mac was having a recent version of Java and a Java Development Kit (JDK) pre-installed on Mac OS X until the release of version 10.7 Lion. On Snow Leopard, the 64-bit version of Java 6 came already installed.

With MacOS X Lion, however, Java does not come out-of-the-box and you have to download and install it manually (or via the Apple Software Update) – except in rare cases where you upgraded from Snow Leopard to Lion.

The first package of Java 6 for Mac OS X Lion for download & manual installation can be found on the following link: http://support.apple.com/kb/DL1421
The download size is about 62.5 MB and gets you Java SE version 1.6.0_26 (64-bit of course). Although this one is not be the most up-to-date version, once you have it on your system, you would be prompted to upgrade automatically next time Apple Software Update is run.

As for JDK 7 for Mac, it will be available directly from Oracle, maybe even through the App Store – no official announcement on the latter, though, so far, but stay tuned for good news!

If you are a Java developer who wants to do Java development on Mac OS X 10.7, here are a few not-so-tricky steps to follow to get going:

  1. Go to http://connect.apple.com and sign in with your Apple ID (developer account may be required – it’s free).
  2. From the list titled “Downloads for Apple Developers”, select the item labeled “Java for Mac OS X 10.7 Update 1 Developer Package” (release date Nov 8, 2011) then download and install the package.
  3. The JDK will be installed into a different location then previous. This will result in IDEs (such as Eclipse) being unable to locate source code and java docs.
  4. At the time of writing the JDK ended up here:
    /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
  5. Open up Eclipse preferences and go to Java > Installed JREs page
  6. Rather than use the “JVM Contents (MacOS X Default) we will need to use the JDK location
  7. At the time of writing Search is not aware of the new JDK location; we we will need to click on the Add button
  8. From the Add JRE wizard choose “MacOS X VM” for the JRE Type
  9. For the JRE Definition Page we need to fill in the following:
    JRE Home: /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
  10. The other fields will now auto fill, with the default JRE name being “Home”. You can quickly correct this to something more meaningful such as:
    JRE name: System JDK
  11. Finish the wizard and return to the Installed JREs page
  12. Choose “System JDK” from the list
  13. You can now develop normally with:
  • javadocs correctly shown for base classes
  • source code correctly shown when debugging

Java for Mac OS X LionWhy Java no longer pre-installed on Macs?

What has happened is Apple has quit mangling their own JDK into the OS and delegating responsibility to Oracle to supply a JDK for OSX going forward. It isn’t installed by default, but after the fact just like on every other platform other than Solaris. Arguably this will be a good thing, as the Apple JDK usually lagged like 6 months behind the official Sun/Oracle one.

Original Press Release

As of the release of Java for Mac OS X 10.6 Update 3, the version of Java that is ported by Apple, and that ships with Mac OS X, is deprecated. This means that the Apple-produced runtime will not be maintained at the same level, and may be removed from future versions of Mac OS X. The Java runtime shipping in Mac OS X 10.6 Snow Leopard, and Mac OS X 10.5 Leopard, will continue to be supported and maintained through the standard support cycles of those products.

 

Mac OS X Lion For Dummies (For Dummies (Computer/Tech))

Mac OS X Lion: The Missing Manual

Be Sociable, Share!
  • Tweet

Related posts:

  1. How to Bounce Mail Messages in Mac OS X Lion * Updated *

Categories
cross-platform, Mac
Tags
Development, Java, JDK, Mac, Mac OS X 10.7 Lion
Comments rss
Comments rss
Trackback
Trackback

« How to Bounce Mail Messages in Mac OS X Lion * Updated * How to make Apple Mail Faster »

3 Responses to “How to Install Java (and JDK) on Mac OS X Lion”

  1. gss says:
    Thursday February 9th, 2012 at 05:47 PM

    On newer versions of OS X you should find ALL JREs (and JDKs) under
    /Library/Java/JavaVirtualMachines/
    /System/Library/Java/JavaVirtualMachines/
    the old path
    /System/Library/Frameworks/JavaVM.framework/
    has been deprecated.
    Here is the official deprecation note:

    http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate3LeopardUpdate8RN/NewandNoteworthy/NewandNoteworthy.html#//apple_ref/doc/uid/TP40010380-CH4-SW1

    Reply
  2. avc says:
    Friday February 10th, 2012 at 11:36 AM

    Alternatively, you can open a Terminal window, and type the command: javac -v; then Mac OS X Lion will suggest you to install Java, you just click ‘yes’, and then the Apple Software Update will download and install Java automatically for you.

    Reply
  3. slitr says:
    Monday February 13th, 2012 at 10:10 AM

    Netbeans 7.01 just worked fine after following your instructions. Eclipse Indigo has serious problems, but I’m not sure if it’s a Mac (Lion) thing or it’s just Eclipse itself.

    Reply

Leave a Reply

Click here to cancel reply.

*
= 4 + 0


Recent Posts

  • How I resolved my Apple Magic Mouse problem on Bootcamp Windows 7
  • How to Easily Transfer and Share files between your Mac, iPhone, iPad and iPod Touch even PC and Android devices
  • iPad HD aka iPad 3
  • How to make Apple Mail Faster
  • How to Install Java (and JDK) on Mac OS X Lion
  • How to Bounce Mail Messages in Mac OS X Lion * Updated *
  • Play Commodore 64 / Amiga Games on your iPhone, iPad or iPod Touch
  • Setting Up Mail and Calendar Accounts in iPhone
  • How to Convert .daa Disk Images to .iso
  • How to easily open UIF disk images on the Mac and convert to .iso format

Follow iMaclord on Twitter


Tags

announcements Apple breakthrough browsers Chrome colloboration compatibility cross-platform cross-platform compatibility disk image formats e-mail Facebook file conversion file viewers Google hardware iCal iMac innovative Internet iOS iPad iPhone iPhone howto's iPod iweb live Mac Mac apps Mac OS Mac vs PC Microsoft networking old stuff OS specifics PC portable pricing Safari tablet technorati touchbook video web design Windows

Categories

  • Apple
  • browsers
  • compatibility
  • cross-platform
  • Games
  • General
  • hardware
  • iCal
  • Internet
  • iOS
  • iPad
  • iPhone
  • iPod
  • Mac
  • networking
  • PC
  • software
  • tablet
  • video

Recent Comments

  • Maclord on Apple’s new Tablet Device iPad Unveiled
  • some internet dude on Apple’s new Tablet Device iPad Unveiled
  • Lasse on Play Commodore 64 / Amiga Games on your iPhone, iPad or iPod Touch
  • Dave on Play Commodore 64 / Amiga Games on your iPhone, iPad or iPod Touch
  • Adam on How to Bounce Mail Messages in Mac OS X Lion * Updated *
  • Faysal Moubarak on Download Google Chrome for Mac here *** Updated
  • avc on How to Easily Transfer and Share files between your Mac, iPhone, iPad and iPod Touch even PC and Android devices
  • Maclord on Start Using Hotmail with Microsoft Entourage or Apple Mail
  • Maclord on How to Bounce Mail Messages in Mac OS X Lion * Updated *
  • Anshuman on How to Bounce Mail Messages in Mac OS X Lion * Updated *

 

May 2012
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  

Subscription / Abonnement / Abonelik

Fill out the form below to signup to our blog newsletter and we'll drop you a line when new articles come up.

Our strict privacy policy keeps your email address 100% safe & secure.

This Blog Also About:

  • amiga iphone games
  • ipod nano application
  • ipad and iweb
  • ipad touchbook
  • ical mac
  • telecharger google chrome mac os x
  • mac os başlangıc
  • iphone tethering özelligi
  • ipad language support
  • silverlight download. pour ipad
  • how to configure hotmail for mac mail
  • os x lion email actions
  • safari browser. selectedtab safari javascript
  • ipad 3 magic mouse
  • nvidia başlangıcta görünüyor
  • quicktime components gratuit mac
  • osk "disk image" ufi to iso
  • mac open chm file
  • imac imajını macbooka yüklemek
  • e ajanda
  • eclipse indigo e lion
  • installer silverlight pour ipod touch
  • apple mail alternatif mail programı
  • disque ntfs sur mac leopard 10.4
  • file transfer protocol vnc
  • old mac os 8
  • send files from android to ipad. 2012
  • ipad 3
  • utiliser mac 27 écran
  • of mail
  • OzarWEB

Pages

  • About Maclord’s Blog
  • Contact Maclord
  • Downloads
  • Mac Basics
  • Privacy Policy

Links

  • GO-Blog (in Turkish)
  • iOS Themes from iTheme World iOS Themes
  • Ozar.net (Turkish) The organization which started all these blogging – specialized on Mac niche markets and SEO
  • Ozar.net Developer Blog Programming in PHP, C, C#, ASP.NET, Java, Objective-C, SQL also for MS SQL Server, Oracle & MySQL Development
  • OzarWEB Online Internet services and web development resources

RSS GOZmosis

  • A Dramatic Surprise On A Quiet Square
  • An Awesome Reply From CEO Of J P Morgan To A Pretty Girl Seeking A Rich Husband
  • Great explanation of windows firewall
  • Geek Meditation Session
  • What's the Difference between a Boss and a Leader?

RSS OzarWEB

  • Announcing Downloads Section & Old version software
  • OzarWeb Logger now available
  • OzarWeb 2 FTP
  • OzarWEB 2 FTP now available!

RSS Mac rumors

  • ElcomSoft's Phone Forensics Software Offers Near Real-Time Access to iCloud Backups 18/05/2012
  • Apple in Talks to Open R&D Facility in Russia's Skolkovo Innovation Centre? 18/05/2012
  • Apple's Annual iTunes Festival in London Moves to September 18/05/2012
  • Steve Jobs 'Worked Closely' on Design of Next-Generation iPhone with Larger Display 18/05/2012
  • Screenwriter Aaron Sorkin Shares Some Thoughts About Steve Jobs Biopic, Woz Hired As Advisor 18/05/2012

Language

  • English
  • Français
  • Türkçe

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox