Sunday, April 24, 2011

Skype4Java Mavenized API released!

I'm glad to announce that I have released the first version of the mavenized skype api to the maven central repo:

First version is 1.1 (err, don't wanna talk about 1.0 :P), please enjoy!

I actually thought I would have more trouble to release the project in the central repo, but it was actually quite easy. Ok, there are several requirements, but they are easy to meet. The only "tricky" one was that I needed a valid domain to use as groupId. At first, I thought I would have to pay for a domain and keep it forever, but then I found out that I could use github's domain for this purpose (as you will notice if you read the pom).

I would like to thank Koji Hisano, I got in touch with him by mail to ask whether he would be okay with this move, since I mostly copied his project, and I got full support from him.

Now, all of you who'd like to use Skype4Java / Skype Java Api, please enjoy and feel free to talk back.

This version should support:

- Windows 32 and 64 bit
- Linux 32 and 64 bit
- Mac OS 32 bit

It is possible to run under MacOS 64 bit with compatibility mode (java -d32).

See ya!


  1. This comment has been removed by the author.

  2. I'm using your library and it works pretty good on Windows, well done you solved some issues of old Skype4Java api.
    My problem is that when I try to use it in ubuntu linux, a JVM crash appears, here it is an excerpt:

    Could not acquire getLogger method!
    #A fatal error has been detected by the Java Runtime Environment:
    #SIGSEGV (0xb) at pc=0xb32c4e37, pid=10752, tid=2985261936
    #JRE version: 6.0_26-b03
    #Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing linux-x86 )
    #Problematic frame:
    #C [] long+0xc

    with Java Result: 134

    Could please tell me how to fix it?
    Thank you very much.

  3. Hello gurucoder,

    I'll have to check what happened in your case. I tested the library under windows, linux 64 bit and mac os, but I didn't try on linux 32bit. That't probably a problem with 32 bit native library. I'll try on 32bit and investigate it.


  4. ok thak you very much! You are doing a great job man! go on! :D

  5. Hi, I tried your library on Ubuntu 11.04 64bit version but I get same error I got on 32bit version...JVM crash... if you want I could send you the java error logs.. please let me know..

  6. I just sent you a message on gitHub about a possible reason of the crash on linux... please let me know

  7. Hi, Someone can explain how can I create a sample java program into Eclipse (using Maven or Tomcat)?

    A simple guide that contains all steps I have to efford?

    Thank you

  8. Hi

    Tried to get 1.2 running, not really successfull :(

    Using a 32bit Version I got an error because the skype_x68.dll is extracted to the directly returned by getTempDir() which is not the same that is checked in Win32Connector (it has an additional sub directory).

    When providing the dll direclty in the library path I got an UnsatisfiedLinkError at jni_init();

    Stopped testing for other versions afterwards. May you can have a look?

    Looking forward to version 1.3 ;)

    best regards

  9. Hello BChrom,

    I already released version 1.3, maybe it fixes the problem you're having. In fact, I commited some fixes to improve windows compatibility.

    If it doesn't, please let me know. I don't do a lot of tests under windows, but I ran the suite of unit tests under my vista before the 1.3 release and everything went fine.

  10. hi,

    wow, thanks for quick response. The 1.3 is not yet available in maven-repo - is it?

    I took a look at the source of 1.3 but it seems it's still faulty (extract path and lookup path differ). May you had the dll directly in path and not 'only' used the jar?

    Thanks anyway!

  11. I'll check it. I thought I deployed it in the central, but since there is still this issue I'll check it. I didn't notice because the tests passed under windows.

  12. Hi,

    great in meantime I created a workaround. Calling 'loadWinLibrary();' before 'Connector.getInstance();' fixes the library problems (also issue #7 which is caused by the fact that a library might be in path but not really loaded - to be in users working directory is not enought).

    best regards

    * Used as the current extraction/loading of native dll inside the skype library fails.
    * Should be removed when fixed in skype api.
    private void loadWinLibrary() {
    try {
    if (System.getProperty("", "xxx").toLowerCase().indexOf("win")>=0) {
    // Loading DLL
    try {
    } catch (Throwable e) {
    final String osArch = System.getProperty("os.arch");
    String LIB_FILENAME_FORMAT = "skype_%s.dll";
    String libfilename = String.format(LIB_FILENAME_FORMAT, osArch);
    // this check is wrong, if path is in library path we should use loadLibrary if false,
    // if it's in user path (checked by method) than the dll will not be found, we have to load it anyway
    //if (!ConnectorUtils.checkLibraryInPath(libfilename)) {

    File localLibFile = checkLibraryInPath(libfilename); // nice to have but not really necessary
    if (localLibFile!=null) {
    } else {
    String tmpDir = System.getProperty(""); // temp dir should be used but can't as win32 connector does not use it - ConnectorUtils.getTempDir();
    if (!tmpDir.endsWith("" + File.separatorChar)) {
    tmpDir = tmpDir + File.separatorChar;
    ConnectorUtils.extractFromJar(libfilename, libfilename, tmpDir);
    System.load(tmpDir + libfilename);
    } catch(Exception e) {
    logger.warn("Failed to load skype dll (workaround)", e);

    * @param fileName File to find
    * @return File path of existing file, null if given file name not in path
    private File checkLibraryInPath(String fileName) {
    File result = null;
    String libpath = System.getProperty("java.library.path")+File.pathSeparatorChar+System.getProperty("user.dir")+File.pathSeparatorChar;
    File libfile = new File("");
    StringTokenizer st = new StringTokenizer(libpath, File.pathSeparator);
    while (st.hasMoreTokens()) {
    libfile = new File(st.nextToken()+File.separatorChar+fileName);
    if (libfile.exists()) {
    result = libfile;
    return result;

  13. Hi again!

    Additional hint/request: would be create if in "ConnectorUtils.extractFromJarUsingClassLoader" also the class loader of this class can be used when resource not available through the system classloader (e.g. liburl = ConnectorUtils.class.getClassLoader().getResource(libFileName);)

    In our webstart-environment where a special classloader is used to load our own packages (as they are crypted) it would not work otherwise. Maybe other people have same issues here...

    Thanks & best regards

  14. I know, it's been a while. I'm back to fixing issues and the latest source code has the correction. I won't release it just now because I still have to fix some issues on Mac OS.

    Best regards

  15. Hello Takeuchi,

    did you yet release your Skype4Java version 1.3 ? It would be great if you would let me know that. If you already have release 1.3 version then can you give me the link please from where i could download that ?

    I am looking forward to hearing from you.
    Partho Biswas.

  16. Hello Partho

    I intend to release the 1.4 version soon. I'm still working on a few bugs reported under Mac OS. I'll let you know when I release it.


  17. Really !!! It's a great news... And thank you very much for replying me.

    Did 1.3 version yet released ? It would be great if you let me know that. If it already have release then can you please give me the link from where i can download 1.3 version ? Because i didn't find out the link. I have already coded my app using Skype4Java version 1 now i want to upgrade it on Skype4Java version 1.3 or 1.4
    My final goal is to run my app on Windows 32 bit, 64 bit And MAC os X Lion.

    I am looking forward to hearing from you .
    Thank you.
    Partho Biswas

  18. Hello Takeuchi,

    Did you actually released 1.3 version ? I searched it everywhere and all over the internet but i didn't find it. Would you please check it again ? And please don't take it otherwise if i am wrong.
    Thank you for your nice job.

    Thank you.
    Partho Biswas

  19. Maybe there was a mistake and I forgot to stage it.
    Anyway, I'm releasing 1.4 this week (probably, tomorrow).

    Sorry for the inconvenience.

  20. how can i use these library? at link i got jar files but how to use them please help :(

  21. Actully i need to integrate skype with my application..

  22. HI Sumit,

    I recommend that you start by looking at the project in the following link:

    There you'll find several examples using the skype-java-api. You can either use the same build model I used for this project (building with maven) or just download the jar files and putting in your classpath to build with ant or whichever mean you want.

    Best regards!

    1. Hi Gabriel,

      I am getting below error:
      ins\\src>java com/skype/examples/swt/MakeCall siddha.sumit
      Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Sumit\Deskto
      p\R&D_ChatWindow\skype_1.0\skype\release\swt-win32-3232.dll: Can't load IA 32-bi
      t .dll on a AMD 64-bit platform
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(Unknown Source)
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.loadLibrary0(Unknown Source)
      at java.lang.System.loadLibrary(Unknown Source)
      at org.eclipse.swt.internal.Library.loadLibrary(
      at org.eclipse.swt.internal.win32.OS.(
      at org.eclipse.swt.internal.win32.TCHAR.(
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)

      My system is 64 bit but skype.jar i have use 32bit .dll file now i need jar for 64bit

  23. The jar has both dlls. I believe the problem is that you're using a 32 bit java. Try using a 64 bit jdk

  24. Hi Gabriel,
    Now i am able to call from code by running test program now can you tell me how to chat.
    In class there is static chat(String skype_id) method but when i call it does not help in making chat..could you help me!

  25. I am using in this way :)
    public class MakeCall {
    public static void main(String[] args) throws Exception {
    if (args.length != 2) {
    System.out.println("Usage: java 'skype_id' chat/call");
    else if(args[0].equals("chat"))


  26. chat function is not working please help me

  27. Hi

    The usage is incomplete. By using"someuserid") you are just obtaining the chat object. You still need to use the object to send a message, for example:"echo123").send("this is my message");

    Kind regards

  28. This comment has been removed by the author.

  29. Hi Gabriel,

    Thanks for your help, now my requirement are given:

    1)Login into skype from cmd not from skype client gui.
    2)i want to use skype api but not skype gui to chat and calling just like facebook use skype video functionality but not skype gui.

    This is main requirement please Gabriel help me.

  30. It is not possible to login from skype api. Skype's public api framework requires skype to be running and already connected.

    It is is possible to control the chats from your program, but you won't be able to prevent the skype gui from receiving and showing the messages.

    You can make calls using"user"). Just like the Chat API, this invocation will return a Call object that can be used to manipulate the calls, including video calls. Again, you can't get away from the skype client, you'll have to work with it.

    1. This comment has been removed by the author.

  31. Then how facebook use skype video functionality(but not skype GUI.) facebook use its own gui to video chat.

  32. There's another development kit called "Skype Kit" that can be used to write skype clients. Skype Kit is not just a API to interact with skype, it allows you to write skype clients. That's probably what facebook uses.

    Skype API for java was developed way before skype kit existed and is based on "skype public api" or "skype desktop api" ( and this API is far more restricted than skype kit.

    It seems that what you really need is skype kit. I'll just let you know that skype kit is NOT open source and is NOT free,

  33. I understand it not free, but is there any free trial available or any details documentation that can satisfy me as this is the one I am looking for.

  34. Hey Gabriel,

    How are you? can you tell me how i can download skype kit.Actually i need to write my client so can be used in my application in which gui will be my own and functionality from skype will be used.

  35. Hey Gabriel, sorry to bother. Have you been able to run this on mac os x lion? My problem is that lion is 64 bits, and I can't find a 32 bit jre or jdk of java 7 for lion, so -d32 is not working. Do you know of any workarounds?

  36. Hi,
    I am getting bellow exception while using this API.

    java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\Ramesh\AppData\Roaming\NetBeans\7.3\apache-tomcat-\temp\skype_x86.dll

    I am using JDK 1.6 32bit and OS is Windows-7 32 bit.
    I am used bellow Maven dependency in my project