JIntellitype与java(JIntellitype with java)

编程入门 行业动态 更新时间:2024-10-19 18:36:22
JIntellitype与java(JIntellitype with java)

如何在Java中使用JIntellitype? 如果那是不可能的,我将如何在系统托盘菜单上使用热键,即使应用程序不在焦点上也会起作用。

但是,我无法让JIntellitype在MAC OSX上工作。

如何在mac上完成这项工作?

How is it possible to use JIntellitype in Java? If that's not possible, how would I use Hotkey on a system tray menu, which would act even if application is not in focus.

However, I have not been able to get JIntellitype to work on MAC OSX.

How can I make this work on a mac?

最满意答案

我知道这个问题有点陈旧,但没有答案。 JIntellitype使用Java Native Interface(JNI)来利用直接与操作系统API对话的C / C ++,从而绕过JVM的沙箱限制。 正如您已经注意到的,本机C / C ++代码依赖于平台,在这种情况下只能在Windows上运行。 Linux( JxGrabKey )和Mac OSX( OSSupport )也有类似的项目,但每个平台的API都不同。 如果您需要更好的跨平台支持,可以尝试使用JNativeHook 。

I know this question is a bit old, but it has no answer. JIntellitype uses that Java Native Interface (JNI) to leverage C/C++ that talks to the operating system's API directly thus bypassing the sandbox limitations of the JVM. As you have already noticed, the native C/C++ code is platform dependent and will only run on Windows in this case. There are similar projects for Linux (JxGrabKey) and Mac OSX (OSSupport), however, the API for each platform differs. If you need better cross platform support, you can try using JNativeHook.

更多推荐

本文发布于:2023-08-06 16:55:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1452821.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:JIntellitype   java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!