how to add smack packge to API

Reply

Join Date: Nov 2008
Posts: 18
Reputation: Narayan15 is an unknown quantity at this point 
Solved Threads: 0
Narayan15 Narayan15 is offline Offline
Newbie Poster

how to add smack packge to API

 
0
  #1
Dec 11th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,122
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 472
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to add smack packge to API

 
0
  #2
Dec 11th, 2008
In your project you need to include classpath to this library from your IDE, for example in NetBeans you can do as described here
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 18
Reputation: Narayan15 is an unknown quantity at this point 
Solved Threads: 0
Narayan15 Narayan15 is offline Offline
Newbie Poster

Re: how to add smack packge to API

 
0
  #3
Dec 11th, 2008
actually i m using editplus editor, i dont use NetBeans
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 18
Reputation: Narayan15 is an unknown quantity at this point 
Solved Threads: 0
Narayan15 Narayan15 is offline Offline
Newbie Poster

Re: how to add smack packge to API

 
0
  #4
Dec 11th, 2008
please help me
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,351
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 500
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: how to add smack packge to API

 
0
  #5
Dec 11th, 2008
Then read the help file for that editor on how to include libraries on the classpath.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,281
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 243
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: how to add smack packge to API

 
0
  #6
Dec 11th, 2008
smack package? What's it do? Spank you?
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,581
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 461
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: how to add smack packge to API

 
0
  #7
Dec 12th, 2008
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.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC