Compile and debug spark in eclipse

Source: Internet
Author: User

Spark is a good Jabber Client. It is from the same place as openfire. It can be said that it is a set of powerful instant messaging software with openfire, especially it is free and open-source, you can create your own client. the following describes how to use eclipse to debug spark, which is also from the ignite realtime community.

Spark SVN + eclipse 3.3 + subversive installation guideversion 3 publishedcreated on: Aug 23,200 7 pm by aznidin-Last modified: aug 27,200 7 pm by aznidinthis Guide assumes that you are installing everything from scratch. if you 've done some parts of them, this Guide may still be useful. I compile this guide to the best of my knowledge. I apologize if it doesn' t work for you.

Notes:

  • This Guide assumes that you want the latest updates of the source I. e. From the project'sTrunkDirectory. If you only want the released/stable version, checkout the desired release from underTagsDirectory.
Install JDK
  • Download JDK and install them. The least version shocould be 1.5. I use 1.6. Sorry, no instruction for this.
Install eclipse 3.3
  • Download eclipse 3.3 From www.eclipse.org. I useEclipse IDE for Java EE developers. You shoshould at least useEclipse IDE for Java developers.
  • Extract the downloaded ZIP fileC:/program files/eclipse.
  • OpenC:/program files/eclipseFolder.
  • Right click and dragEclipse.exeOn to your desktop (or Windows taskbar) to create a shortcut cut icon.
  • Right click the shortcut icon and chooseProperties.Eclipse PropertiesWindow will show.
  • TheTargetTextbox shoshould read something like this"C:/program files/Eclipse/eclipse.exe"-VM "C:/program files/Java/jdk1.6.0/bin/javaw"Depending on the JDK that you use and where you installed it.
  • CloseEclipse PropertiesWindow.
Install subversive plugin
  • Double-click the shortcut icon to start eclipse.
  • Select/enter your preferred workspace and clickOKTo open eclipse main ide window.
  • Click onWorkbenchIcon to close the welcome screen.
  • ClickHelp: Software Updates: Find and install...Menu.
  • Click onSearch for new features to installAnd clickNext.
  • Click onNew remote site...Button.
  • EnterSubversiveInNameBox andHttp://www.polarion.org/projects/subversive/download/1.1/update-siteIn
    The URL box (check the latest URL from http://www.eclipse.org/subversive website), then clickOK.
  • ClickFinishTo install subversive. eclipse will search for the update site and show the result in a next window where you will select the features to install. I choose everything underSubversive SVN team provider pluginAndSubversive
    Client Libraries
    .
  • ClickNextTo continue and so on until the installation ends. You normally want to restart eclipse when the installation ends.
Check out spark SVN
  • ClickWindows: open perspective: other...Menu.
  • Click onSVN repository indexing ingOnOpen perspectiveWindow and clickOK.
  • Right-click onSVN RepositoriesScreen and chooseNew: Repository location...
  • OnNew repository locationEnterHttp://svn.igniterealtime.org/svn/reposIn the URL box
    And clickFinish. You'll see the URL location inSVN RepositoriesScreen.
  • Expand the URL location.
  • ExpandSparkTree.
  • Right-click onTrunkAnd chooseCheck out. Make yourself some mocha while waiting for the checkout to complete.
Create Spark Project
  • ClickWindow: open perspective: JavaMenu.
  • InProject ExplorerScreen, if there isSparkProject, delete it. This project was created during the spark check out process. Yes you read it correctly, delete the project !!! Otherwise you'll have to setup your spark
    Development Environment manually. OnConfirm project DeleteChooseDo not delete Contents, Then clickYes.
  • ClickFile: New: Project...Notice the ellipses !!!
  • SelectJava: Java ProjectAnd clickNext.
  • OnNew Java ProjectWindow chooseCreate project from existing sourceAnd browse to whereSparkFolder is located under your workspace.
  • InProject nameBox enter exactlySpark. Otherwise,NextAndFinishButton remain disabled. Click onNext. Eclipse will read the directory structure to setup
    The environment automatically (almost) for you and you can see what it does on the next screen. Then click onFinish.
  • IfOpen associated perspectiveWindows opens, click yes.
Build spark
  • ClickWindow: Show view: antMenu.
  • Right-clickAntScreen and chooseAdd buildfiles...
  • ExpandSpark: BuildFolder and selectBuild. xml, Then clickOK.
  • OnAntScreen, expandSparkAnd double-click onReleaseAnt task. The build may fail because you're checking out the daily updates of spark sources, which may contain bugs. If so, wait for another
    Day and hope that the developers discover and fix the bug; or you might dare to fix it yourself. during this first time setup, a successful build is necessary before you can proceed with the remaining tasks below.
Create Project Builder
  • ClickRun: Open Run dialog...OrRun: Open debug dialog...Menu.RunWindow shows.
  • SelectJava applicationAnd click onNewButton.
  • OnMainTab OfRunWindow, changeNew_configurationNameSparkOr anything you like.
  • Click onProject: browseButton and selectSparkAnd clickOK.
  • Click onMain class: SearchButton and selectStartup-org. jivesoftware. LauncherAnd clickOK.
  • I 'd suggest that you selectStop in mainCheck box so that you cocould later verify that debugging works.
  • Click onClasspathTab.
  • SelectUser entriesSo thatAdvanced...Button will be enabled.
  • Click onAdvanced...Button.
  • OnAdvanced optionsWindow selectAdd foldersAnd clickOK.
  • OnFolder SelectionWindow selectSpark: SRC: ResourcesFolder and clickOK.
  • Click onCommonTab.
  • SelectDebugAndRunCheck box.
  • Click onApplyButton.
  • Click onCloseButton.
Run/debug
  • The setting is now complete for spark.
  • You may test running and debugging by clicking onRun: Run history: sparkAndRun: Debug history: sparkRespectively. If you choose the later and if you follow this instruction closely, execution will stop in the main method
    OfStartup. Java.
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.