Deploy openfire server locally

Source: Internet
Author: User

Start directly

Step 1: Download The openfire source code

: Http://www.igniterealtime.org/downloads/source.jsp choose openfire_src_3_8_1.zip, download (68.74 MB)

Step 2: Import openfire from eclipse

Decompress openfire_src_3_8_1.zip to the eclipse work area.

File-> New-> JAVA project deselect the check status of default location, and browse and select the decompressed openfire_src directory.

Step 3: Compile ant

After the openfire project is imported, click WINDOW> show View> ant to display the ant window. In the ant view, right-click, in the pop-up shortcut menu, select Add buildfiles in the pop-up dialog box, expand the openfire_src/build folder, and select build under the build directory. next, double-click XML and run openfire [Default] (the one with a triangle symbol)

Step 4: introduce the required jar package (coherence. jar-coherence-work.jar-tangosol.jar -)

Decompress the package and copy it to/openfire_src/build/lib.

Step 5: Configure openfirehome

In eclipse, use the shortcut key Ctrl + Shift + R to find the xmppserver file and modify openfirehome

If (openfirehome = NULL) {try {// openfirehome = verifyhome (".. ", jiveconfigname ). getcanonicalfile (); openfirehome = verifyhome ("D:/work/eclipse3.7/workspace/openfire_src/target/openfire", jiveconfigname ). getcanonicalfile (); // relative path changed to absolute path, used to test whether the server can run the dml@2013.4.15} catch (filenotfoundexception Fe) {// ignore .} catch (ioexception IE) {// ignore .}}

Step 6: Set the startup Item

Click the openfire_src project and choose run> open run dialog (or run-> RUN deployments) from the menu bar)
In the displayed dialog box, right-click Java application in the left-side menu and select new to create the startup configuration.
 
1. on the main Tab Of The Run window, modify the value in the top name text box and change it to the project name openfire_src that contains the class to be started.
(It's useless. It's just an identifier. You can just name it .)
 
2. In the main Tab Of The Run window,
Enter openfire_src in the project box.
Enter org. jivesoftware. openfire. starter. serverstarter in main class.
Click Apply.
 
3. Click the arguments tab and fill in the above box (Program arguments :)
-D openfirehome = "$ {workspace_loc: openfire_src}/target/openfire"
The openfire_src in $ {workspace_loc: openfire_src} must be modified synchronously based on your project name.

Eg. [-D openfirehome = "D:/work/eclipse3.7/workspace/openfire_src/target/openfire"]
Click Apply.


 
4. Click the classpath tab, select user entries, and click the Advanced button on the right. A dialog box is displayed. Select Add folders and click OK.
Select openfire_src \ SRC \ i18n and click OK to add the folder to the classpath tab.
Select the openfire_src \ SRC \ resources \ jar directory and add it to the classpath tab.
Click Apply.
 
5. Click the common tab and select the run check box.
Click Apply Application and run

Step 7: test whether the server has been set up

Enter http: // 127.0.0.1: 9090 in the browser

End

Dml@2013.4.15

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.