i have installed Jdk6.0 version, this doesn't contain smack package.
here i have written a programme

import java.util.Collection;

import org.jivesoftware.smack.*;

public class GtalkClient {

public static void main(String[] args) throws XMPPException {
ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com", 5222, "rgukt.in");
XMPPConnection connection = new XMPPConnection(config);
connection.connect();
connection.login("< narayana.nuz >","< narayanramlall >");

// Below is the code to get the users



// Here is a code to send message to a friend

MessageListener messageListener = null;
Chat chat = connection.getChatManager().createChat("sridhar.nuz@rgukt.in",messageListener);
chat.sendMessage("ore");
}
}

I m getting this error

---------- compile ----------
GtalkClient.java:3: package org.jivesoftware.smack does not exist
import org.jivesoftware.smack.*;
^
GtalkClient.java:7: cannot find symbol
symbol  : class XMPPException
location: class GtalkClient
public static void main(String[] args) throws XMPPException {
                                              ^
GtalkClient.java:8: cannot find symbol
symbol  : class ConnectionConfiguration
location: class GtalkClient
ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com", 5222, "rgukt.in");
^
GtalkClient.java:8: cannot find symbol
symbol  : class ConnectionConfiguration
location: class GtalkClient
ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com", 5222, "rgukt.in");
                                     ^
GtalkClient.java:9: cannot find symbol
symbol  : class XMPPConnection
location: class GtalkClient
XMPPConnection connection = new XMPPConnection(config);
^
GtalkClient.java:9: cannot find symbol
symbol  : class XMPPConnection
location: class GtalkClient
XMPPConnection connection = new XMPPConnection(config);
                                ^
GtalkClient.java:19: cannot find symbol
symbol  : class MessageListener
location: class GtalkClient
MessageListener messageListener = null;
^
GtalkClient.java:20: cannot find symbol
symbol  : class Chat
location: class GtalkClient
Chat chat = connection.getChatManager().createChat("sridhar.nuz@rgukt.in",messageListener);
^
8 errors

Output completed (0 sec consumed) - Normal Termination

could u please help me

Recommended Answers

All 6 Replies

In your project you need to include classpath to this library from your IDE, for example in NetBeans you can do as described here

actually i m using editplus editor, i dont use NetBeans

please help me

Then read the help file for that editor on how to include libraries on the classpath.

smack package? What's it do? Spank you?

Use Apache Ant as a build tool to compile your application with dependencies or just use the command line invocation of `javac' and `java' which supports classpath options.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.