Change desktop background of MAC sytem using Java native access

前端 未结 2 1473
北海茫月
北海茫月 2021-01-23 07:48

I have got a code snippet to change system desktop using JNA, it is worked fine for me.

What change i need to make this code for working on Mac Os.

Help is highl

2条回答
  •  深忆病人
    2021-01-23 07:54

    Looks like you need to Map the NSWorkspace class to JNA. Define an interface that extends Library class in JNA. Then map the setDesktopImageURL:forScreen:options:error: method ot JNA.

    http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html

提交回复
热议问题