openfire3.9.1+jdk1.7 Import into eclipse
Write this article, is also a record of their own a few nights of hard, because as a novice to read a lot of information on the Internet, but according to their I always out, with their description of the inconsistency, may be environmental problems, and then their own finally out, while recording, to the novice a little comfort.
- first extract the downloaded openfire_src_3_9_1.zip into an eclipse workspace, such as my:E:\makalu4\ OPENFIRE_SRC
- then import the openfire_src into Eclipse : New java project name openfire_src The same as the extracted source file name. the JRE chooses jkd1.7, specifically
- Then click Next, and then point to finish.
- then open the OPENFIRE_SRC project to see the following:
Click to enter The first error packet in the class, found missing JAR Package
put this three The JAR downloads down into
Then the first error packet is gone, then the second error packet is deleted.
Then the third error package:
Remove the error class (because it already exists ). )
In the following is the fourth error package:
Check the error class, according to Eclipse Auto Fix know: The method that needs to be implemented.
- make Run configurations configuration:
Main class :org.jivesoftware.openfire.starter.ServerStarter, and tick the first check box (Include system ... . )
in the selected Arguments Tab:
in the VM arguments :-dopenfirehome= "${workspace_loc:openfire_src}/target/openfire", where Red is the name of the project.
in the selected JRE Tab:
Keep in mind that the JDK environment for the entire project must be consistent.
then select the classpath tab:
Click Advanced button:
Click OK:
Select the item src/i18n Click OK:
the same operation will add Src/resources/jar:
when i18n and jar are added:
and then select Common Tab:
and then tap Apply button, do not start Run. Because of the Ant Build!
then see if the JDK is consistent: inconsistencies are modified here
this place chooses 1.6, not 1.7, otherwise will run the times wrong ...
- Open the Ant Compilation window in Eclipse window/show View
Click the second arrow in the diagram:
Click OK, then:
, click the second arrow to compile
Compile successfully ...
then back to Select runin Run configurations:
Finally, enter 127.0.0.1 in the browser :9090 Enter to see the effect.
In this case, the OPENFIRE_SRC is successfully imported into Eclipse .
openfire3.9.1+jdk1.7 Import into Eclipse