Develop your own MSN java client.

Written by Ivan Shi


Now, use msnmlib 1.2(the website is in Korean), you can write programs as client to MSN servers.
You can write msn robots or your own MSN Messenger use Java.

Here I have a very short tutorial on how to use msnmlib 1.2, and my Java development IDE is Eclipse 3.0

Prepare:If you had already downloaded msnmlib 1.2 package fromrepparttar offical project website,  then unzip it to any folder on your HDD.Here I use d:java_devcommon ,you will get a jar file: msnm.jar.Otherwise, you have to downloadrepparttar 107680 latest version of msnmlib from the offical web site or the project page on sourceforge

First step, open your Eclipse IDE and use New Project wizard to create a new java project in your default workspace(ofcoz, you can use another workspace), and name your project(here I use jRCS,which means java Realtime Customer Servcie System)

Second, In Eclipse, Select menu Window--> Prefence, expandrepparttar 107681 Java node inrepparttar 107682 left treeview,
and then expand Build path node in Java node, and then select node User Libraries. We will add a new user library refer to the path where you place your msnmlib jar file. Click new... to add a new user library MSN_LIB and click Add Jars... to makerepparttar 107683 user library variable refer to msnmlib jar file:d:java_devcommonmsnm.jar

Now, edit properties of project jRCS by selectrepparttar 107684 context menu of jRCS node inrepparttar 107685 Project Explorer. Here we will editrepparttar 107686 Java Build Path and add a new library for this project. Of coz, we will addrepparttar 107687 pre-defined User Library MSN_LIB here.

Ok, finally, we have our development environment set up. It's time for coding!

Coding Step 1: Create your own MsnAdapter class for an adapter that can listen torepparttar 107688 events fired by MSN Messenger. You should make you adapter class extend from the parent class rath.msnm.event.MsnAdapter.repparttar 107689 MsnAdapter class has morerepparttar 107690 10 methods for event listening. but you have not to implement all the methods, and by user Eclipse New Class Wizard, it is not a hard job to implement a lot of methods. For short and easy, We only implement method MsnAdapter.instantMessageReceived(SwitchboardSession ss, MsnFriend friend,            MimeMessage mime).
Method instantMessageReceived is invoked byrepparttar 107691 MsnMessenger instance every time when you receive a new message (MimeMessage) from MsnFriend.
Here is my code to reply to the friend "How are you doing":




public class MSNAdapter extends MsnAdapter {
MSNMessenger msn;

public MSNAdapter(MSNMessenger msn) {
this.msn = msn;
}

public void instantMessageReceived(SwitchboardSession ss,
MsnFriend friend, MimeMessage mime) {
System.out.println(friend.getFriendlyName()
+" send me some msg:"+mime.getMessage());
try
{
// create a new message
MimeMessage mm = new MimeMessage();

// remember to appendrepparttar 107692

The Da Vinci Code Is A Must-Read Thriller

Written by Rakhi Garg


“THE DA VINCI CODE BY DAN BROWN” IS A TREMENDOUS MUST-READ PALM E-BOOK

“THE DA VINCI CODE BY DAN BROWN” is absolutely unpredictable intelligent thriller book. It is a truly amazing fictional story which is very suspenseful at whole time. Dan Brown is one ofrepparttar best skilled thriller writers inrepparttar 107679 country.

“THE DA VINCI CODE BY DAN BROWN” scored aboverepparttar 107680 smart thrillers as pure genius, rapid happening of extreme enthusiasm. The story is recommended highly as it is packed with exciting riddles, code-breaking, smart thrill and utmost page-turning suspense.

After receiving an urgent late-night phone call about a murder of museum curator when Robert Langdon starts to solverepparttar 107681 case, he findsrepparttar 107682 clues hidden inrepparttar 107683 works of Da Vinci. He joins French cryptologist, Sophie Neveu and decodes a volatile tortuous historical puzzle. Then story takes an interesting turn….

Cont'd on page 2 ==>
 
ImproveHomeLife.com © 2005
Terms of Use