msgbartop
Where agile meets sysadmins, infrastructure, itil , operations
msgbarbottom

10 Oct 08 New Project , New Eclipse 3.4 Installation on Mac OSX Leopard

It happens once in a while. When starting a new project you re-install your Eclipse environment. This document describes the initial setup I use and the problems I encountered during the setup.

Details: Mac Book Pro Intel , OsX Leopard

Step 1: Downloading Eclipse

  • Nothing as dull as describing how to download Eclipse. Point your browser to http://www.eclipse.org/downloads
    and Select the version Eclipse IDE for Java EE Developers (+/- 162MB). If you are downloading on a windows machine be sure to select the correct version as the download site tries to be smart …
  • We downloaded the file called eclipse-jee-ganymede-SR1-macosx-carbon.tar.gz
  • And save it somewhere where you can find it back
  • Extract the file (double click) will resullt in a folder ‘eclipse’
  • Copy the file in /Applications directory (requires admin privileges)

Step 2: Preparing your Java JVM (Use 1.5 for Eclipse)
check your java version by open a commandline and running: ‘java -version’

macbook-patrick:~ patrick$ java -version
java version “1.5.0_13″
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

If this reads 1.6.x this will result in Eclipse to Crash (JVM Terminated).

Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse ; exit;
macbook-patrick:~ patrick$ /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse ; exit;
_NSJVMLoadLibrary: NSAddLibrary failed for /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/libjvm.dylib
JavaVM FATAL: Failed to load the jvm library.

You have two options:

  • Switch the whole system back to 1.5 (recommended).
    • link /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK to the correct one
    • launch /Applications/Utilities/Java/Java\ Preferences.app/Contents/MacOS/Java\ Preferences.

        See also http://www.gridshore.nl/2008/03/29/java-on-apples-mac-osx/

  • Change the Eclipse start script so that it specifically uses 1.5:  edit /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini
    • Add : -vm /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java

Step 3: First Launch and cleanup

Launch eclipse by clicking on launching /Applications/eclipse/Eclipse . (the lowercase one will spawn a shell for debug log)
Have it point to a workspace directory . I choose $HOME/Documents/development/workspace

When I started it correctly recovered my previous projects in that folder. But the console was giving a warning Project ‘.JETEmitters’ is missing required library .

This JETEmitters seems to be a hidden project that was used in the past f.i. by other projects. This can be safely removed:

  • go to the project explorer view
  • select available customizations
  • click on the small triangle and change the filter options (In the Filter tab -> (deselect) .JetEmitters  and .* resources)
  • Now the project should be visible and you can delete it

http://publib.boulder.ibm.com/infocenter/rsdhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.transform.uml2.corba.doc/topics/tcorbaviewjettempl.html

Step 4: Make sure you are and stay current

Even when I downloaded there was still an update to be done

  • Help -> Software Updates and Add-ons
  • Check Updates
  • Install updates and restart.

Auto Update: This might be a double edge sword. I would never automatically update my environment but I do want to be notified

  • Stay current -> Automatic Updates (preferences)
  • Update every day: 13:00 PM
  • Search updates and notify

Step 5: Install some common plugins

Installing plugins in Eclipse is easy

  • Help -> Software Updates and Add-ons
  • Add Site … (your plugin update page)
  • Install…

Subversion Plugin

I tried a sample checkout : File -> New -> SVN -> Checkout Projects from SVN -> Unable to load default SVN Client

This error is because the current version of Leopard is too old (1.4)

macbook-patrick:~ patrick$ svn –version
svn, version 1.4.4 (r25188)
   compiled Sep 23 2007, 22:32:34

To fix this you have three options:

Maven2 Plugin:

JUnit Plugin:

Eclipse has Junit Integrated now, no need for a plugin anymore

Aptana Plugin: (for doing javascript better)

See http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration#Eclipse_3.4_Instructions

Groovy Plugin:

See also http://groovy.codehaus.org/Eclipse+Plugin

CheckStyle Plugin:
5.0. beta 0.1

Cobertura Plugin: Test Coverage(no eclipse plugin yet?)

  • Site: http://cobertura.sourceforge.net/

See http://www.nabble.com/Eclipse-plugin-for-Cobertura-td19497037.html

PMD Plugin:

More to check later …
Trac Plugin: 
Hudson Plugin:
Hibernate plugin

Share/Save/Bookmark

Tags: , ,



Reader's Comments

  1. |

    If you want to run more than one Eclipse instance, just copy the application bundle (only 120kb) and give it a different name. I use names which relate to the software projects I am working on. The name is also being displayed in the dock, so you always know where you are going to.

  2. |

    Yes you could do all of that … but at the end you’ll still have a crappy environment!

    Don’t get me started on Maven multi module projects and Eclipse, nor the support for Spring, Hibernate or whatever technology, nor any web related technology, nor refactoring capabilities … they ALL lack maturity.

    I could say Eclipse is great, but I would be lying, I truly hate it! On a recent project everyone was using it so I taught why not give it another try? I switched back within the week to my beloved IntelliJ!!! Another week later other team members have been installing it also :-D Just have a look at IntelliJ it will boost your productivity beyond believe. It is such a mature platform for development, you wont believe it. And yes, it embraces multi module structure + Maven :-)

    Yes, it is not free but at least you get what you pay for. Support is more than great, if you run into a bug or a problem you’ll get a reply within 24h. Even their support for EAP versions is amazing, you want it they fix it!

    IntelliJ … the force is strong with this one! ;-)

  3. |

    Wow, Harald and Maarten thanks for the comments. I’m learning something new everyday (Patrick in Wonderland ;-) I’ll give IntelliJ a try and who knows I’ll end up writing the same document for IntelliJ …

  4. |

    The option to add -vm param in eclipse.ini did not work for me. Instead I uncommented a line in Eclipse/Contents/Info.plist close the end of file that looks like this:

    -vm/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java

    Hope it helps.



Leave a Comment