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 *
  2. Download Bootcamp (Windows) drivers for Macs shipped with Mountain Lion
  3. Write and Delete Files from (NTFS-formatted) USB drives connected to your Mac

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 »

4 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
  4. CaliforniaJack says:
    Wednesday August 8th, 2012 at 07:02 PM

    Thank you, Maclord. I couldn’t find a “jre”, so I didn’t know what to tell Eclipse. Your info was just what I needed.

    Reply

Leave a Reply

Click here to cancel reply.

*
= 4 + 2

Recent Posts

  • Write and Delete Files from (NTFS-formatted) USB drives connected to your Mac
  • Download Bootcamp (Windows) drivers for Macs shipped with Mountain Lion
  • Download Safari for Windows here
  • 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

Follow iMaclord on Twitter


Tags

announcements Apple Bootcamp 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 Lion Mac Mac apps Mac OS Mac vs PC Microsoft networking old stuff OS specifics PC portable Safari tablet technorati touchbook video web design Windows

Categories

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

Recent Comments

  • uumart on Write and Delete Files from (NTFS-formatted) USB drives connected to your Mac
  • avc on Downloads
  • CaliforniaJack on How to Install Java (and JDK) on Mac OS X Lion
  • Marrisa on 5 CHM viewers for the Mac
  • Maclord on 5 CHM viewers for the Mac
  • Marrisa on 5 CHM viewers for the Mac
  • Marrisa on 5 CHM viewers for the Mac
  • avc on Play Commodore 64 / Amiga Games on your iPhone, iPad or iPod Touch
  • Alex on Play Commodore 64 / Amiga Games on your iPhone, iPad or iPod Touch
  • macMAMA on How to Bounce Mail Messages in Mac OS X Lion * Updated *

 

May 2013
M T W T F S S
« Dec    
 12345
6789101112
13141516171819
20212223242526
2728293031  

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:

  • google chrome for mac 10.4
  • amiga iphone games
  • ipod fabrıka ayarlarına dondurme
  • ipad and iweb
  • ipad touchbook
  • ical mac
  • of mail
  • mac os başlangıc
  • quicktime components gratuit mac
  • ipad language support
  • how to configure hotmail for mac mail
  • silverlight download. pour ipad
  • os x lion email actions
  • safari browser. selectedtab safari javascript
  • mouse not working on bootcamp
  • installer silverlight pour ipod touch
  • bootcamp 5.0 driver download
  • nvidia başlangıcta görünüyor
  • disque ntfs sur mac leopard 10.4
  • mac open chm file
  • osk "disk image" ufi to iso
  • e ajanda
  • imac imajını macbooka yüklemek
  • eclipse indigo e lion
  • android cannot write big files to usb ntfs
  • apple mail alternatif mail programı
  • iphone tethering özelligi
  • file transfer protocol vnc
  • send files from android to ipad. 2012
  • old mac os 8
  • OzarWEB

Pages

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

RSS GOZmosis

  • Doctor vs Lawyer
  • A Geo-Political Hospital in 2012
  • An Excerpt from a Cat's Diary
  • What If Drivers were Hired Like Programmers?
  • Why The Next Version of OS X After Mountain Lion Wouldn’t Be Named After a Cat

RSS Mac rumors

  • Apple and Sony 'iRadio' Negotiations Stalling Over Skipped Songs 17/05/2013
  • Tightening MacBook Air Supplies at Resellers Hint at Upcoming Refresh 17/05/2013
  • Difficult Negotiations May Prevent 'iRadio' Launch at WWDC 17/05/2013
  • U.S. Department of Defense Approves iOS 6 Devices for Military Networks 17/05/2013
  • Corning Announces 'Lotus XT' Substrate Glass for Brighter, Cheaper Mobile Displays 17/05/2013

Language

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


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