OpenFire Source Learning Three: Building the source code in eclipse

Source: Internet
Author: User

SOURCE Building

Address: http://www.igniterealtime.org/downloads/source.jsp

Environment preparation

1th step: On the official website under the latest source code, here is 3.8.1. Unzip to get as shown:


2nd step: Create a new Java generic project name OpenFire on the IDE tool


3rd step: The extracted openfire_src directory under the source of all the files copied to this project, the example shown in the figure


Wait here for a moment and see the following:


There is an error message report in the project, do not worry. The reason is that some jar packages have not been added to the newly imported project. Keep looking down!

4th Step: Right click on the project selection properties, in the "Java Build Path" in the "Libraries" to add all the build/lib under the jar package. As shown in the following:


Note: There are three 3 packages under this LIB package, all add in:


5th step: After loading these jars, do not close the current window. Continue clicking on the Source tab


6th step: Click Add Folder ... Choose:


In order to facilitate the editing, the source code of the plug-in display, in the Properties folder select Source,add Folders, in the build path configuration /openfire_src/src/i18n ,/ Openfire_src/src/resources/jar ,/openfire_src/build/lib/dist folders are added to Source

7th step: For example, the error is due to the lack of coherence corresponding package: Coherence.jar, Coherence-work.jar Jartangosol.jar


These jars are http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html. Available for download. Next, copy the three jar packages to:/openfire_src/src/plugins/clustering/lib.


8th step: Eclipse has integrated ant, so we only need to right-click on the/openfire_src/build/build.xml file, select Run as–> Ant build to complete the compilation, after the program is successful, the/OPENFIRE_SRC /The following directory generates two new folders: Target and work


9th Step: Configure startup Parameters

Choose Run–>run configurations ... Left Java application, right-click and select New:

Change the default name:new_configuration to:serverstarter

The Main class is configured as: Org.jivesoftware.openfire.starter.ServerStarter


Select the Arguments tab and fill in the VM arguments:

-dopenfirehome = " ${workspace_loc:openfire}/target/openfire "

Note: Project path ${workspace_loc:openfire}


Check the Common tab to hook Debug and run (easy to start quickly), then click Apply

The development model provided

-ddevelopmentmode= "true"



At this point the Opnefire source environment is built up.


OpenFire Source Learning Three: Building the source code in eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.