Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Apple Java Extensions (com.apple.eawt) work on JDK 7 and higher?

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.


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).

like image 280
Martijn Courteaux Avatar asked Jun 29 '14 18:06

Martijn Courteaux


1 Answers

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.

Take a look at it here: https://github.com/mcourteaux/MultiTouch-Gestures-Java

like image 54
Martijn Courteaux Avatar answered Oct 09 '22 23:10

Martijn Courteaux