powered by Jive Software

How to add smack library to Eclipse3.4.1

Hi

I want use smack API for my project, presently I am using Eclipse IDE 3.4.1.

plz any body guide me how to add smack3.1 library to Eclipse3.4.1

Regards

jagtap

Go to your project folder (Ex. C:\workspace\myproject) make folder lib, then copy smack.jar and smackx.jar in the lib folder. Go in Eclipse, select your project and press F5 (this will refresh your project and the folders in it), go right click on your project from Eclipse, and go to Build Path -> Configure Build Path…, in the dialog window select the tab Libraries, and then the button Add JARs… (on the right side). Dialog window will appear, and go to your poject lib folder and select both jar files and click ok. This will add the jar files to your build path and you can use smack in your code.

Hi Folks,

I am newbit for chat applications, and I want to start of with some good examples of how to use smack. Also I was unable to find any binary builds for smack, or neither smackxx.jar.

Here you can download the binary http://www.igniterealtime.org/downloads/index.jsp (go to Smack 3.1.0, choose cross-platform and download the zip or tar.gz file, there are smack.jar and smackx.jar, and some other libs)

And here is the documentation for Smack 3.1.0 http://www.igniterealtime.org/builds/smack/docs/latest/documentation/index.html (read carefully and you can build very simple console app, if you want more sophisticated application, for example GUI then you should first read The Java Swing Tutorial http://java.sun.com/docs/books/tutorial/uiswing/, and working with treads http://java.sun.com/docs/books/tutorial/essential/concurrency/). If you don’t use threads, your gui app will freeze, for example when you connect to the server, login, getting the roster, etc. so you have to do this things in diferent threads.

The Smack API Javadoc is here http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/

If you want you can see http://www.jbother.org/ . It is opensource GUI jabber client build with Smack API.