Learning Java on a Mac: My Serpentine Route

A  joint Labor Day and Wedding Anniversary celebration.

Today is not only Labor Day, a holiday in the U.S., but it’s also our wedding anniversary.  Mr. WebDiva and I have been married an inordinate number of years.  What better way to celebrate than to learn Java?

How did this come to be, you might ask?  Well… it started ten days ago upon attending an excellent Web Spiders session.  The session featured two Vanderbilt School of Engineering faculty and several students, including the President of the Vanderbilt Computer Association, demonstrating applications they’ve developed for Android and the iPhone.

My question….  With my knowledge of PHP, MySQL, plus some ancient underpinnings for Fortran and PL/I (learned back in the punch card era, no less), was I a good candidate for developing my own mobile phone apps?  Answer: yes, definitely.  What to learn next?  Answer: Java for Android.  (The other option, Objective-C for iPhone, didn’t appeal as much.)

So that’s how it all began.  Next steps have been….

1. Buy a great Java book.

After browsing Amazon’s virtual shelves, I decided on Head First Java, 2nd. ed.  I love this book, but this morning, now several chapters into it,  I concluded it’s more theoretical than hands on. (Duh. The title says it all.)  For learning code, I need some hands on. My grand plan is to go back and forth.

2. Search the Web for tutorials about learning Java on a Mac.

The good news: Java is native to Mac OS X.  Figuring out what package to download and install isn’t necessary.

The bad news: there’s almost nothing out there when you search intro Java/Mac tutorials on Google and Bing. (Actually I’m using Bingle, but that’s another story.)  All you can find is that eye-crossing stuff for people who already know everything there is to know on the topic.

3. YouTube, however, has a few adequate tutorials.

Eureka!

I started with the silent, but simple and to the point, You [sic] first java on OSX.  Then it was on to the more thorough, with voice, Compile and run java on Mac via Terminal.  Between these two I had my first Java program running from Terminal in no time.  Then one of those wonderful, serendipitous links that YouTube is so good at, led to the start of an excellent series: Java Tutorial #1 – Hello World.

4. A Java development environment?

The first thing you learn in “Java Tutorial #1 – Hello World” is that not only does the author use and recommend the Eclipse development environment, but also Eclipse is available for Macs.  Dandy.  I go to download it, but there are not one but two versions of Eclipse for the Mac: Carbon and Cocoa.    What’s a diva to do?

5. Carbon vs. Cocoa Eclipse?

Back to Google and Bing, but, once again, there’s not much out there.  My brain is turning to glue. I’m reading through obscure articles on Mac flavors of Eclipse, learning such things as the word “Galileo” is somehow part of it, when Mr. WebDiva announces lunch.  In honor of our anniversary, my wonderful, amazing better half has made a chocolate babka! Be still my heart. The answer to my latest dilemma is now obvious: download the Cocoa version, while eating seconds of babka.

Put these five steps together, and I’ve now programmed four more simple (and silly) little Java apps in Eclipse.  Who could ask for a nicer Labor Day and Anniversary?

5 comments ↓

#1 Conor Magee on 09.23.09 at 1:05 pm

Thanks for that Miss Diva! Found it very helpful as just starting Java dev on OSX and, like you, found it a real struggle to get my hands on the most basic info.

I know that more experienced coders may sneer, but your links were just what I was looking for… no one tells you how to use Terminal or how to compile.

Thanks again,
You’re a star,

and Happy Anniversary (belated) !!!

#2 Anna Belle on 09.23.09 at 6:10 pm

Thanks, Conor! Since writing this post I found another terrific resource. It’s a book that doesn’t cost a lot: Jave in Easy Steps. One of the awesome Computer Science students suggested it, and I’ve been racing through it.

#3 iresha on 09.23.09 at 10:09 pm

Simple java such as the semantics and syntax are easy to pick up. It’s fun stuff that requires knowledge of more specialized APIs.

I’ve found this site useful in the past, maybe it may help you
http://codediaries.blogspot.com

#4 Anna Belle on 09.24.09 at 5:40 pm

Thanks for the resource, iresha.

#5 Allen Hjelmfelt on 12.10.09 at 3:57 pm

This may be more than you want to get into, but to combine learning Java with learning object oriented programming check out:

http://www.bluej.org/index.html

Leave a Comment