简体   繁体   中英

How do I attach to Skype using Skype4Java?

I am getting the following exception when trying to run the MakeCall example code:

com.skype.NotAttachedException
    at com.skype.Utils.convertToSkypeException(Utils.java:36)
    at com.skype.Skype.setDebug(Skype.java:116)
    at com.skype.sample.MakeCall.main(MakeCall.java:26)
Caused by: com.skype.connector.NotAttachedException
    at com.skype.connector.Connector.assureAttached(Connector.java:580)
    at com.skype.connector.Connector.addConnectorListener(Connector.java:604)
    at com.skype.connector.Connector.addConnectorListener(Connector.java:591)
    at com.skype.connector.Connector.setDebug(Connector.java:209)
    at com.skype.Skype.setDebug(Skype.java:114)
    ... 1 more

Now, I have not provided any sort of API credentials, so I kind of expect it to fail. My question then, is how do I provide whatever credentials necessary to attach my connector? The documentation on Skype4Java seems pretty slim.

After not getting any tips here, I have cross-posted this question on the Skype community forum as well.

Had same thing, went on Skype->Options->Advance->Manage Other Programs access to Skype...selected Java.exe from the list and set option to allow. Working perfect now.

If you have the dbus dependency installed, then make sure to start skype on the command line with the "--use-system-dbus".

https://developer.skype.com/Docs/ApiDoc/src#Linux

Once skype is running and you then start the java program, you'll be prompted to allow your java program to access skype.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM