java - JSkype error sending message -


i'm trying run following code unfortunately facing error problems

package jskypeexample;  // import jskype packages    import net.lamot.java.jskype.general.abstractmessenger;    import net.lamot.java.jskype.general.messagelistenerinterface;    import net.lamot.java.jskype.windows.messenger;    import java.lang.thread;    import java.lang.exception;    /**    *    * @author swhite    */    public class jskypeexample implements messagelistenerinterface {     // create messenger we'll use sending messages    private abstractmessenger msgr = null;     /** creates new instance of jskypeexample */    public jskypeexample() {     msgr = new messenger();    msgr.addlistener(this);    msgr.initialize();     try {      // number may vary on system depending on amount      // of time required initialize msgr.      thread.sleep(1000);      // send skype api text command    msgr.sendmessage("message seanmwhite hello ui student");      msgr.sendmessage("search friends");    } catch (exception e) {      e.printstacktrace();    }    }     public static void main(string[] args) {      new jskypeexample();    }     public void onmessagereceived(string str) {      // handle strings returned.      system.out.println(str);    }   } 

but when comment following lines runs well.

 msgr.initialize();   msgr.sendmessage("message seanmwhite hello ui student");  msgr.sendmessage("search friends"); 

but have send commands receive response. i'm using jskype api (open source api java ).

you have set boolean value initilaze function returning true or catch execpetion if false.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -