XMPPConnection NoClassDefFound

import org.jivesoftware.smack.*;

public class message

{

public static void main(String[] args)

{

try

{

XMPPConnection conn = new XMPPConnection(“192.168.7.105”);

conn.login(“admin”, “123456”);

Chat chat = conn.createChat("Josh@192.168.7.105");

chat.sendMessage(“This is a Test”);

}

catch (Exception e)

{

e.printStackTrace();

System.exit(-1);

}

}

}

ok thats my simple program to send a message to me from command prompt.

I compiled it using:

javac -classpath \smack.jar

It compiles with no errors.

I then run it using:

java message

I get the following error:

Execption in thread “main” java.lang.NoClassDefFoundError: org/jivesoftware/smack/XMPPConnection

Thanks in advance.

Edit: I complete changed the post to reflect my further attempt at getting it to work.

Got it working. For anyone thats curious The solution was to include all the classpath definitions when calling my script from command prompt.

So instead of:

java message

I did:

java -classpath “<class1>;\smack.jar;\smackx.jar” message

Works like a champ