Pages

Showing posts with label java apple. Show all posts
Showing posts with label java apple. Show all posts

Monday, 30 July 2012

Mountain Lion Development Environment Links

As befitting a minor release there are only a few fixes if you want get things back in order when working with Mountain Lion.

Java development environment:

  • Understanding java from command line on OSX a great summary of "how it works" the command line java_home command line utility and how to get it all working again :-)
  • For reference I added the following to ~/.bash_profile:
    export JAVA_HOME=`/usr/libexec/java_home`

General development via homebrew:

Friday, 26 August 2011

How to hook up Eclipse to Mac OSX Lion System JDK for source code and javadocs

With a bit of help from the #geotools IRC channel (thanks Micheal Bedward) I have gotten around to hooking up Eclipse with the "normal" Mac OSX JDK.
The normal JDK is actually a bit hard to find; as it requires a separate download. The location of the JDK has also recently moved leaving much of the documentation out of date.
References:
Here is how to fix things up:
  1. Lion does not come with a JDK; you can go and download one directly from http://connect.apple.com. Yes you need to sign up and login with your apple id. The download column is over on the right; and you should be able to find your way.
  2. The jdk is installed into a different location then pervious. This will result in IDEs (such as Eclipse) being unable to locate source code and javadocs.
  3. At the time of writing the JDK ended up here: /Library/Java/JavaVirtualMachines/1.6.0_31-b04-415.jdk/Contents/Home
    Please go ahead and have a look to confirm where your JDK ended up; this will no doubt change over time.
  4. Open up eclipse preferences and go to Java --> Installed JREs page
  5. Rather than use the "JVM Contents (MacOS X Default) we will need to use the above JDK location
  6. At the time of writing the Search button was not aware of the new JDK location; we we will need to click on the Add button and hunt it down ourselves.
  7. From the Add JRE wizard choose "MacOS X VM" for the JRE Type
  8. 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
  9. The other fields will now auto fill, with the default JRE name being "Home". You can quickly correct this to something more meaningful:
    JRE name:System JDK
  10. Finish the wizard and return to the Installed JREs page
  11. Choose "System JDK" from the list
You can now developer normally with javadocs correctly shown for for the base classes like java.lang.String, source code correctly shown when debugging.

Friday, 22 October 2010

When they came for me

Sometimes prose is not enough.

When the apple came for OS 9.
I remained silent;
I was not a OS 9 user.

When they locked up Power PC
I remained silent;
I did not own a Power PC.

When they came for Carbon
I did not speak out;
I was not a Carbon developer

When they came for Flash,
I remained silent;
I was not a Flash developer.

When they came for me,
there was no one left to speak out.

So while I am upset about apple deprecating Java; the original poem by Martin Niemöller, is about something that actually matters.