Openfire3.9.3 source code Import in Eclipse Development configuration Guide

Source: Internet
Author: User

This article introduces you how to import openfire3.9.3 source into Eclipse, compile and start the detailed process.

First of all thanks to the author of this article, http://www.micmiu.com/opensource/openfire/openfire-src-config/, with the help of this article, I succeeded in importing OpenFire into eclipse , most of the content of this article is also that article, I crown the original name, is to leave a note and in the new version of the problem to give everyone a little help, after all, I also spent a lot of time, hope will not be said to be infringed.

Into the subject, see this article of the Netizen should have installed Jdk,eclipse, I do not install these development tools to repeat, attach a openfire: http://www.igniterealtime.org/downloads/index.jsp.

1, download source Openfire_src_3_9_3.zip, the current version is 3.9.3

2, the download good openfire_src_3_9_3.zip decompression to work space, structure and directory as follows:

3, the Openfire_src\build\eclipse directory under the settings, Classpath, project all copied to the Openfire_src\ directory, and then the Openfire_src\classpth, Openfire_src\project, openfire_src\settings Modify the Eclipse project configuration file format, renamed to add a point to each original name, namely. Classpth,. Project,. Settings. Note: Under Windows cannot be renamed directly, need to operate under DOS, that is, into the corresponding directory execution, rename classpth. Classpth, the other two files perform the same operation:

4. Then open eclipse, select File–> import...–> Existing Projects into Workspace select F:\WORKSPACE\OPENFIRE_SRC Import to:

The post-import directory structure is as follows:

You will find yourself on this project with an exclamation point, and enter the build path, and you will find:

This means that the jar package is missing, select the file, then click the Remove button on the right to remove it, of course, we can also go to the Internet to download one, click on the right of the add JARs ... Add it, but I did not add the problem, it may be that some plug-ins need this jar, now regardless of him.

After removal of three errors, it's OK, we fix the error step-by-step, \openfire_src\src\java errors, because there is a jar package, not introduced, we will introduce it:

Note: Only one can be referenced at a time, so you need to do it four times before it's OK. After clicking OK, we found that the error on \openfire_src\src\java was gone. \openfire_src\src\plugins\clustering\src\java Error, Because of the lack of coherence.jar,coherence-work.jar,tangosol.jar these three jar packages, we will copy to the \openfire_src\src\plugins\clustering\lib directory, Then add the three jar packages to the build path:

At this time we found that the \openfire_src\src\plugins\clustering\src\java error has disappeared, here I provide the three jar package, http://download.csdn.net/detail/ lovexieyuan520/7630845, of course, you can also go to other places to download.

The last error on \openfire_src\src\plugins\sip\src\java is because the two classes of Sipcommrouter.java and Sipmanager.java do not implement an abstract method and do exception handling. The simplest solution is to use the Eclipse Auto-repair feature to fix it. Now we find that our project is no longer a mistake.

5. Ant Compilation Project

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

6. Run OpenFire Project

①, add the/openfire_src/src/i18n,/openfire_src/src/resources/jar,/openfire_src/build/lib/dist folders to the build path configuration Source,

② Configuring Startup Parameters

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

Change the default name:new_configuration to: Serverstarter.

Select the Main tab, click the Browse button to select the OPENFIRE_SRC project, and click the Search button to enter: Serverstarter automatic filter After selection: serverstarter– Org.jivesoftware.openfire.starter:

Select the Arguments tab and fill in the VM arguments:

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

Note: Project Path ${WORKSPACE_LOC:OPENFIRE_SRC}

Select the Common tab, tap Debug and run (Quick Start later), then click Apply, then click Run:

③ after running the console log as follows:

Enter address in ④ browser: http://127.0.0.1:9090 Enter:

See above interface indicates openfire source configuration, import, compile, start has been successful.

Finally finished, I hope to help you, next, I will introduce how to develop plug-ins in OpenFire

Reference: OpenFire official Website Development Document

Download jar:https://cn.jarfire.org/

Ext.: http://blog.csdn.net/lovexieyuan520/article/details/37743433

Openfire3.9.3 source code Import in Eclipse Development configuration Guide

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.