dev for openfire with eclipse


Install JDK

  • Download JDK and install them. The least version should be 1.5.I use 1.6. Sorry, no instruction for this.

Install Eclipse 3.3

  • Download Eclipse 3.3 from I use Eclipse IDEfor Java EE Developers. You should at least use EclipseIDE for Java Developers.

  • Extract the downloaded zip file into C:/ProgramFiles/Eclipse.

  • Open C:/Program Files/Eclipse folder.

  • Right click and drag eclipse.exe on to yourdesktop (or Windows taskbar) to create a shortcut icon.

  • Right click the shortcut icon and chooseProperties. The EclipseProperties window will show.

  • The Target textbox should read something likethis “C:\Program Files\Eclipse\eclipse.exe” -vm “C:\ProgramFiles\Java\jdk1.6.0\bin\javaw” depending on the JDK thatyou use and where you installed it.

  • Close the Eclipse Properties window.

Install SubversivePlugin

  • Double-click the shortcut icon to start Eclipse.

  • Select/enter your preferred workspace and clickOK to open Eclipse main IDE window.

  • Click on the Workbench icon to close thewelcome screen.

  • Click Help::Software Updates::Find andInstall… menu.

  • Click on Search for new features to install andclick Next.

  • Click on New Remote Site… button.

  • Enter Subversive in the Namebox and the URL box (Check the latest URL from, then click OK.

  • Click Finish to install Subversive. Eclipsewill search for the update site and show the result in a nextwindow where you will select the features to install. I chooseeverything under Subversive SVN Team ProviderPlugin and Subversive ClientLibraries.

  • Click Next to continue and so on until theinstallation ends. You normally want to restart Eclipse when theinstallation ends.

Check Out Openfire SVN

  • Click Windows::Open Perspective::Other…menu.

  • Click on SVN Repository Exploring on theOpen Perspective window and clickOK.

  • Right-click on SVN Repositories screen andchoose New::Repository Location…

  • On New Repository Location enter inthe URL box and click Finish. You’ll see the URLlocation in the SVN Repositories screen.

  • Expand the URL location.

  • Expand the openfire tree.

  • Right-click on trunk and choose CheckOut. Make yourself some Cafe-Latte while waiting for thecheckout to complete.

Create OpenfireProject

  • Click Window::Open Perspective::Java menu.

  • In the Project Explorer screen, if there is anopenfire project, delete it. This project wascreated during the Openfire check out process. Yes you read itcorrectly, DELETE the project!!! Otherwise you’ll have to setupyour Openfire development environment manually. On theConfirm Project Delete choose Do notdelete contents, then click Yes.

  • Click File::New::Project… Notice theellipses!!!

  • Select Java::Java Project and clickNext.

  • On the New Java Project window chooseCreate project from existing source and browse towhere openfire folder is located under yourworkspace.

  • In the Project name box enterexactly as openfire. Otherwise, theNext and Finish button remaindisabled. Click on Next. Eclipse will read thedirectory structure to setup the environment automatically (almost)for you and you can see what it does on the next screen. Then clickon Finish.

  • If the Open Associated Perspective windowsopens, click Yes.

Build Openfire

  • Click Window::Show View::Ant menu.

  • Right-click the Ant screen and chooseAdd Buildfiles…

  • Expand the openfire::build folder and selectbuild.xml, then click OK.

  • On the Ant screen, expand the OpenfireXMPP Server and double-click on openfireant task. The build may fail because you’re checking out the dailyupdates of Openfire sources, which may contain bugs. If so, waitfor another day and hope that the developers discover and fix thebug; or you might dare to fix it yourself. During this first timesetup, a successful build is necessary before you can proceed withthe remaining tasks below.

Create Project Builder

  • Click Run::Open Run Dialog… orRun::Open Debug Dialog… menu. ARun window shows.

  • Select Java Application and click on theNew button.

  • On the Main tab of the Runwindow, change the New_configuration name toOpenfire or anything you like.

  • Click on Project::Browse button and selectopenfire and click OK.

  • Click on Main class::Search button and selectServerStarter – org.jivesoftware.openfire.starterand click OK.

  • I’d suggest that you select Stop in main checkbox so that you could later verify that debugging works.

  • Click on the Arguments tab.

  • Enter-DopenfireHome=”${workspace_loc:openfire}/target/openfire”in the VM arguments box.

  • Click on Classpath tab.

  • Select User Entries so that theAdvanced… button will be enabled.

  • Click on the Advanced… button.

  • On the Advanced Options window selectAdd Folders and click OK.

  • On the Folder Selection window selectopenfire::src::i18n folder and clickOK.

  • Click on the Advanced… and AddFolders buttons once again to includeopenfire::src::resources::jar folder.

  • Click on the Advanced… andAdd Folders buttons once again to includeopenfire::build::lib::dist folder.
  • Click on Common tab.

  • Select the Debug and Run checkbox.

  • Click on Apply button.

  • Click on Close button.


  • The setting is now complete for Openfire.

  • You may test running and debugging by clicking onRun::Run History::Openfire and Run::DebugHistory::Openfire respectively. If you choose the laterand if you follow this instruction closely, execution will stop onthe main method in

Plugin Setup

Related Documents