powered by Jive Software

Really simple startup question for newbie

I want to import smack into a friend’'s IM project that I have CVS access to, using the Eclipse IDE.

So, after adding smackx, smackx-debugger, and smack JARs to the class path, in order to use them I’'ve done something like this:

import org.jivesoftware.smack.*;

public static void main (String[] args) {

XMPPConnection connection = new XMPPConnection();

connection.login(“mtucker”, “password”);

    System.out.println("test");    connection.createChat("jsmith@jivesoftware.com").sendMessage("Howdy!");


gives this error:

Unhandled exception type XMPPException.

So, can someone point me in the right direction to start using the smack libraries?

Simplest fix – make your main method as follows:

public static void main(String [] args) throws Exception {


The smack API has checked exceptions so you either need to use a try/catch (preferred) or throw the exception.



Thank you matt!