开发者

Can I access the Cocoa Accessibility API from with Java on OSX?

I need to write an app which can observe and manipulate the positions of windows on screen, and I've been told that this requires using Cocoa's Accessibility API.

Unfortunately I'm a Java programmer, and Objective C scares me ;) Is it possible to access this Cocoa API from within Java? I kn开发者_运维问答ow that back when Apple cared about Java it maintained a "bridge" to cocoa, but I'm not sure if this does what I need.

Oh, and my IDE is Eclipse, in case that is relevant.


Yeah, the Java bridge is completely gone in 10.6.

Objective-C really isn't that scary—go read some code or do some tutorials. Java in many ways was modeled on it, in fact.


Java "bridge" is no longer supported by Apple. Don't know if you can access the Accesibility API with older "bridge".

But you can definitely write your own Java wrapper classes using JNI to access what you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜