How to get Apple Java Extensions (com.apple.eawt) work on JDK 7 and higher?(如何让 Apple Java Extensions (com.apple.eawt) 在 JDK 7 及更高版本上工作?)
问题描述
TL;DR:Apple 已放弃对 Java 的原生功能支持.特别是触摸板手势不再起作用.我编写了一个使用 JNI 完成这项工作的库.看看我下面的答案.
TL;DR: Apple has dropped native feature support in Java. Especially touchpad gestures are not working any longer. I wrote a library that does the job using JNI. Take a look at my answer below.
我正在寻找大约几个小时以使 Apple Java 扩展在 JDK 7 或 8 上运行.我一直在尝试所有我能想到的.互联网上所有关于此的线程都只是将此归咎于 JDK.我认为这应该是可以解决的,因为它在 JDK 6 中工作.为了清楚起见:我可以让它在 JDK 6 中工作,但我不想要这种遗留依赖项,因为不是每个将使用我的应用程序的人都有 JDK 6 或知道如何安装它,比方说.目标是制作一个可双击的 JAR 文件,该文件将在安装了每个 Java 版本(大于 JDK 6)的情况下使用 OS X 功能(菜单栏、手势、关于处理程序等)按预期运行.
I'm searching for about hours to make the Apple Java Extensions work on JDK 7 or 8. I have been trying all I can think of. All threads on the internet about this simply blame the JDK for this. I think this should be solvable, because it worked in JDK 6. For clarity: I can make it work in JDK 6, but I don't want this legacy dependency, because not everybody that will use my application has JDK 6 or knows how to install it, let's say. The goal is to make a double-clickable JAR file that will run as expected with the OS X features (menu bar, gestures, about handler, etc...) with every version of Java installed (greater than JDK 6).
推荐答案
自从 OS X El Capitan 的开发者预览版发布后,99% 的普通电脑用户都无法安装 Java 6,所以这不再是一种选择给我.我最终决定编写一个本地库,通过 JNI 通知 Java 有关手势的信息.该项目运行良好,托管在 GitHub 上.
Since the developer preview release of OS X El Capitan, it became impossible for 99% of average computer users to install Java 6, so this was no longer an option for me. I finally decided to write a native library that will inform Java about gestures through JNI. The project works great and is hosted on GitHub.
在这里看一下:https://github.com/mcourteaux/MultiTouch-Gestures-Java
这篇关于如何让 Apple Java Extensions (com.apple.eawt) 在 JDK 7 及更高版本上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何让 Apple Java Extensions (com.apple.eawt) 在 JDK 7 及更高版本上工作?
基础教程推荐
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01