Setting BuddyIcon for user

3 views
Skip to first unread message

shashankt

unread,
May 22, 2009, 6:56:08 PM5/22/09
to joscar discussion
I have a project for SIP Communicator in which I need set BuddyIcon
for the user.

After going through joscardemo which already implements it i have been
able to modify it to suit my condition (setting the Icon from byte[]
of image).
The class used was:
net.kano.joscar.snaccmd.icon.UplaodIconCmd

I have trouble in understanding the following:
*What exactly is joustsim?
*In SC joustsim is widely used. I tried to understand it by googling
around but was unable to clearly understand it.
*Keith also suggested to use aimConnection. getMyBuddyIconManager
().requestSetIcon(...) which is available in joustsim. As he is not
around currently so am unable to ask him.
*Can I get a 'simple' example anywhere of joustsim which can
demonstrate simple logging and sending SNAC packets? (on lines of
joscardemo)

shashankt

unread,
May 25, 2009, 3:33:10 PM5/25/09
to joscar discussion
Hi,
Using the test code given in SIP trunk i tried the following:

public class joscar
{
public static void main(String args[])
{
Screenname uname = new Screenname("user...@aol.in");
DefaultAppSession session = new DefaultAppSession();
AimSession aimSession = session.openAimSession(uname);
AimConnectionProperties ap=new AimConnectionProperties(uname,
"password");
ap.setLoginPort(5190);
ap.setLoginHost("login.oscar.aol.com");
System.out.println(ap.toString());
AimConnection conn=aimSession.openConnection(ap);
conn.connect();
}
}

but am getting the following error:

AimConnectionProperties{loginHost='login.oscar.aol.com',
loginPort=5190, screenname=user...@aol.in, password='password'}
Exception in thread "main" java.lang.NoClassDefFoundError: socks/Proxy
at net.kano.joustsim.oscar.AimConnection.<init>
(AimConnection.java:108)
at net.kano.joustsim.oscar.DefaultAimSession.openConnection
(DefaultAimSession.java:70)
at joscar.main(joscar.java:27)
Caused by: java.lang.ClassNotFoundException: socks.Proxy
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
320)
... 3 more
Java Result: 1

Can do with some help here.
Reply all
Reply to author
Forward
0 new messages