Deploy openfire source code to myeclipse

Source: Internet
Author: User

After a long time, I finally successfully deployed the openfire source code. Now I have recorded my experiences as follows:

1. Download the source code www.jivesoft.org from the official website.

2. decompress the package and copy it to myeclipse wordspace. The directory name is openfiresrc (this name should be used later)

3. myeclipse ---> newproject --> javaproject. projectname is openfiresrc, And the directory name started in step 2 must be the same.

4. After the import is complete, check your compiler JDK version and the JRE version to be consistent (I use JDK 6). Otherwise, errors will occur during ant compilation.

5. Compile with ant

6. Create a project Builder


(1) On the eclipse menu bar, choose run> open run dialog ..., in the pop-up dialog box, select Java application in the tree structure on the left, right-click, and select new to create the startup configuration.
(2) on the main Tab Of The Run window, modify the value in the name text box to the project name openfire_src that contains the class to be started.
(3) on the main Tab Of The Run window, click the Browse button and select openfire_src
(4) on the main Tab Of The Run window, click search, select org. jivesoftware. openfire. starter. serverstarter as the main class, and click Apply. (This is the startup class of openfire)
(5) Click the arguments tab and enter
-Dopenfirehome = "$ {workspace_loc: openfire}/target/openfire"
Click Apply.
This is the parameter passed when eclipse executes the Java command, so that the openfire program can obtain the local location of openfire through system. getproperty ("openfirehome.
(6) Click the classpath tab and select user entries. In this way, advanced... it is available. Click Advanced... on the advanced options page, select Add folders and click OK. (By default, the project openfire has been added here, and this operation is not required. If there are multiple projects, this operation is required .) Select openfire_src \ SRC \ i18n and click OK to add the folder to the classpath tab. In the same way, add the openfire_src \ SRC \ resources \ jar directory
In the classpath tab.
(7) On the common tab, select the run check box and click the Apply button.
After the settings are completed, the project will be run according to the correct configuration. The debug settings are similar to the run settings.
6. Run and test the compilation result (openfire server)
(1) In the eclipse menu, click Run-> Run (or shortcut Ctrl + F11) and the following information appears in the console attempt.
(2) In the web browser, enter http: // 127.0.0.1: 9090/. If the configured openfire page appears, the openfire compilation and running are successful.

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.