ThankstoitshighlyoptimizedbutfullystandardJavaimplementation,MacOSXhasgarneredareputationamongstdevelopersasanexcellentplatformfordevelopinganddeployingJavaapplications.ThemostrecentreleaseofEclipse,thewell-respectedopen-sourceIDE,forMacOSXonlystrengthensthecase,asthisflexibleandhighlyextensibletoolisafavoriteofmanyJavadevelopers.ThisarticleprovidesaquickoverviewofEclipseforMacOSXandexplainshowtodownloadthelatestversionandgetstarted.
WhatIsEclipse?Eclipsewasoriginallydesignedforbuildingintegrateddevelopmentenvironments(IDEs),thatwereversatileenoughtocreateapplicationsforarangeofprogramminglanguages.TheintentionwastoprovidetoolsmakerswithanIDEthatwouldincludemechanismsandrulesthatwouldconsistentlyresultinseamlesstoolsintegration.Sincethen,EclipsehasevolvedtoincludeanIDEthatprovidesbenefitsforawiderangeofdevelopmentprojects.
BecauseitisJava-based,EclipseincludestheJavaDevelopmentKit(JDK);andyetitsarchitecturesupportsallmajorprogramminglanguagesfromC/C++toCobol.
Eclipseisafreedownload,andisavailableonanumberofplatforms.SinceIBMlaunchedEclipseinNovember2001,morethan18milliondownloadrequestshavebeenloggedfromover125countries.
Agrowingconsortiumofhigh-profilecompaniesandorganizationsareactivelysupportingandextendingEclipse'songoingdevelopmentandgivingtheplatformmomentum.Theseorganizationscontributesupportandtechnology,andtheydeterminethedirectionandscopeofEclipse'sgrowth.
HighlyExtensibleBecauseitisahighlyextensible,openframework,Eclipseallowsyoutouse—andcreateyourown—plug-intoolstoextendthebasicEclipseIDEfordevelopingyourapplications.
ThismeansthatifyouaredevelopinganapplicationusingEclipseforMacOSX,andyouneedaspecialtooltofacilitatedevelopmentonyourproject,youcanchoosefromliterallyhundredsofavailableplugintoolsthatworkseamlesslywithEclipseandwithanyoftheplugintoolsyouareusing.
Theseplugins,whichhavebeendevelopedbyawidevarietyofcompaniesandindividuals,runthegamutfromtraditionalcodingtoolssuchassourcecodeanalyzers,graphicallayouttools,andcompilerstoproductivityenhancerslikebugtrackers,sourcecodemanagers,andevengames.Whenyoudownloadandunziptheplugintools,theyareautomaticallyintegratedintotheEclipseframeworkenablingyoutocreatehigh-qualityapplicationsinlesstime.
Eclipse'sarchitecturehasfosteredaworldwidecommunityofplugindevelopers.Asmorepluginsarecreatedthataddresstheentiredevelopmentcycle,Eclipsebecomesincreasinglyuseful,andpopular.
Therangeofpluginsisamazing.OnebiotechconsultantusestheJmechanicplugin,saying,"ourclientscouldquicklyidentifymanyperformanceproblems,andcouldthendecidewhetheritwassomethingtheywantedtofix,outsource,orlivewith."UsingtheEclipsepluginsavedlicensingcosts,andgaveeachdeveloperontheirteamthefreedomtorunatimeprofilebeforecheckingintheircode.
AnotherdeveloperusesEclipseashisprimaryIDE,andsays,"theSysdeoTomcatlauncherpluginisessentialformydailywork,becauseitallowsmetodoruntimedebuggingofmywebapplicationfromwithinEclipse."
Figure1showstheEclipseuserinterfaceonMacOSX,withanopenexampleofasampleplug-inproject.
Figure1:EclipseUserInterfaceonMacOSX
SpeedsDevelopmentYouwillquicklydiscoverthatoneofthereasonsEclipseispopularwithdevelopersisthatitisintuitivetolearnanduse.TheEclipseframeworkincludestheworkbenchcomponentthatprovidesEclipsewithitsuserinterface,acollectionofviewsandeditors.Whenyouselectaperspective,youarespecifyingthesetoftoolsyouneedtouseforthetaskathand.ThiselegantworkbenchmetaphormakestheEclipseenvironmenthighlyintelligent.
Eclipse'sfeaturesarewellimplementedandveryeffective,andaredesignedtoincreasethespeedofthedevelopmentcyclebyautomatingtedioustasksthatdistractyoufromcoding.
Otherstrengthsincludebuilt-inCVSintegrationthatmakesitconvenienttosynchronizecodewiththeCVSserver.OneEclipseusersays,"theSynchronizeviewmakesiteasytomergechangesandviewchangesbeforeIdecidetoupdate.TheAnnotationviewallowsmetodeterminewheneachlineofafilewasaddedandwhoaddedit.Thisfeatureisgreatfortrackingdownbugs."
Eclipseintegratesabest-of-breedimplementationoffeaturessuchas:
CodeRefactoring-Allowsyoutoreorganizeandmakeotherglobalchangestoyourcodesuchaschangingthenameofamethodorchangingparameters.Refactoringisawayofmakingsystem-widecodechangeswithoutaffectingthebehavioroftheprogram.ContentAssist-DisplaysalistofphrasesthatyoucanselectfromtocompletewhatyouaretypingwheneditingJavacode.ThislistisbasedonanongoinganalysisofyourJavacode.QuickFix-Enablesyoutocorrectawidevarietyofproblems,fromspellingerrorsandmissingimportstatementstodeclaringlocalvariablesandclasses.TheJavaeditorofferscorrectionstoproblemsfoundwhiletypingandaftercompiling.ExtractMethod-Createsamethodforthehighlightedcode.UnitTesting-ProvidesyouwithaneasywaytorunalltestsinaspecifiedJavaproject,sourcefolder,orpackage.ImportManagement-Providesyouwithseveralfeaturesthathelpyoumanageimportstatements.DocumentationLookup-Displaysdocumentationrelatingtothemethodyoupointtowiththecursor.Thecommentdisplayedshowsthemethodname,documentationformethodparameters,andthereturnvalue.Debugger-Enablesyoutodetectanddiagnoseerrorsinyourprogramsrunningeitherlocallyorremotely.Thedebuggerincludes"hotcodereplace"thatallowsyoutochangesourcecodeduringadebuggersession.Cross-PlatformDevelopmentTeamsWhenusedwithEclipse,MacOSXsupportsheterogeneousdevelopmentteams,enablingyoutomixMacOSX,Linux,UNIXandXPcomputingenvironments.ThismeansthatifyouhaveadozenWindowsusersandadozenMacusersonyourdevelopmentteam,theseteammembersondifferentplatformscanworkonthesameprojectwithoutbarriers.
Eclipseisgreatfororganizingmultipleprojectswithalargeteamofdeveloperswhocanworkcollaboratively."IfoundthatEclipsegaveusaveryclearpictureofthehundredorsointerlockingprojectsatoneclient"adevelopertoldus."Itmadeiteasytoseewheretheseprojectsconnected,andallowedustorefactorcorelibrarieseasily."Thisdeveloperexplainedthattheirbidtoreduceinter-projectdependenciesforaclientrequiredsplittingadozencoreprojectsintoseparateunits.WithEclipse,oneoftheirteamfinishedthecodingworkinunderaweek.Hesays,"Isuspectthatthemanualmethodwouldhavetakenamonth,andthuswouldnothavebeencosteffective.Youcannothaveyourcorelibrariesinturmoilforthatlong."
Infact,insomeindustries,suchasbiotech,asignificantpercentageofdeveloperscurrentlyareusingMacOSXandPowerBooksbecausetheycandevelopapplicationsforMac,Windows,Linux,andSolarisdeployments,withonebox.Ourbiotechdevelopersays,"MostofourworkisinJava,thoughwealsodoPerl,C++,MATLAB,andwhateverelseourclientsask.WechoosethisplatformbecausetheJavaimplementationisgood,wehaveaccesstoafullunderlyingUnixlayer,andwehaveagoodsuiteofproductivityapplications.WithoutMacOSX,wewouldlikelyhavetocarryaroundtwodifferentmachines,withadualbootLinuxoptiononatleastoneofthem."
WhyDoJavaDevelopmentontheMac?TheeaseofuseofMacOSX,thepowerandstabilityofUNIX,theintegrationofJavaintoMacOSXandtheavailabilityofgreatdevelopmentenvironmentslikeEclipsemaketheMacagreatJavadevelopmentenvironment.
UNIXusersfeelathomeinDarwin,therobustUNIX-basedenvironmentthatunderliesMacOSX.ThatenvironmentisaccessibleatanytimefromtheTerminalapplication.AllofthestandardUNIXutilitiesandscriptinglanguagesareincludedinMacOSX—editorssuchasemacs,vimandpico;filemanagementtoolssuchascp,mv,lsandgnutar;shellscriptsincludingbash,tcsh(csh)andzsh;andscriptinglanguagessuchasPerl,PHP,tcl,RubyandPython.ForJava-basedwebengineers,Apache,TomcatandJBossarealsoincluded,soyoucandoJSPdevelopmentorenterpriseclassJ2EEapplications.
MacOSXalsogivesyouahighlymobileplatform.ThePowerBookseriesprovidesahigh-poweredworkstationthatiscompletelyportableandallowsyoutopickupandgo,andthenquicklyresumeworkatanewlocation.Evenasyouopenyourlaptop,networkconnectionsarebeingreestablishedandthecomputerisimmediatelyupandrunning.
ApplehasmadeJavaacorecomponentofMacOSX—everyMacshipswiththefullversionofJava2,StandardEditionincluded—meaningyouhavetheJavaDeveloperKit(JDK)andtheHotSpotvirtualmachine(VM)withoutdownloading,installingorconfiguringanything.AndbecauseApplehasoptimizedJavaonMacOSX,Javaapplicationsactasfirst-classcitizensonMacOSX.
InadditiontoEclipsemanyoftheindustryleadingtoolsareavailable,includingIntelliJ'sIDEA,Borland'sJBuilder,Oracle'sJDeveloper,andSun'sNetBeans,justtonameafew.MacOSXalsoincludesfreedevelopertoolswhichsupportrapidJavadevelopmentrightoutofthebox.
GettingStartedYoucangetacopyofEclipsebyvisitingtheEclipsedownloadpageanddownloadingthelatestbuild.(ThecurrentversionofEclipserequiresMacOSXv10.3Panther.)Allbuildsaredeliveredas.ZIPfiles.
DownloadandinstallEclipseUsingyourSafaribrowser,gototheeclipse.orgWebsite.ClickDownloads.ClickMainEclipseDownloadSite.IfyouarenotlocatedinNorthAmerica,usethemirrorsiteclosettoyourlocation.ClickthenameoftheReleaseBuildyouwant.Atthetimeofthiswriting,the"3.0StreamStableBuild"isthelatestdeveloperpreviewofversion3.0.Thisversioniscurrentlyfinefordailyuse.Under"EclipseSDK,find"MacOSX(Mac/Carbon)(SupportedVersions)"—thefilenameisalsodisplayed.SelecteithertheHTTPorFTPdownloadoption.AfterreadingtheNotes,click"Download"atthebottomofthepage.Whenthedownloadiscomplete,unzipthearchiveintotheappropriatefolder.(OlderversionsofStuffittruncatedfilenamesandcausedproblemswithEclipse.Makesureyouareusingtheappropriateversion.)
Yourinstallationisnowcomplete.ClicktheEclipseicontolaunchtheIDE.
ThefirsttimeyourunEclipse,itcompletesafewremaininginstalltasks—suchascreatingaworkspacedirectory—beforetheEclipseenvironmentappears.
WorkthroughthetutorialsWithEclipseinstalledandrunning,youcanbeginbylookingatanoverviewofEclipsefeaturesandpluginsinstalledonyoursystem,andthendoingatutorialthatguidesyouthroughbuildingasimpleJavaapplication.
ToseetheoverviewoftheEclipsefeatures:fromtheHelpmenu,chooseAboutEclipsePlatform
TodoatutorialonbuildingasimpleJavaapplication:fromtheHelpmenu,chooseJavaDevelopmentUserGuide>GettingStarted>BasicTutorial
ResourcesforMoreInformationMailinglists:www.eclipse.org/mail/index.htmlPluginarchives:www.eclipse-plugins.info/eclipse/index.jspJoincommunity:www.eclipse.org/community/index.htmlEclipseLive,byBillDudney(paidsubscription).Eclipse,bySteveHolzner.Posted:2004-06-07