Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Oracle's Java 7 for Mac OS X have com.apple.eawt.CocoaComponent or similar?

Tags:

java

macos

cocoa

Apple's Java, which is on version 6 on my machine, has a class com.apple.eawt.CocoaComponent for connecting AWT/Swing apps to Cocoa components. An example use: displaying the UI of an AudioUnit (which is a Cocoa view) in a Java app. I'd like to use Java 7, but I can't find this class in it. Anyone know if it's there, somewhere? Or if there is an alternative?

like image 300
Rob N Avatar asked Nov 04 '22 15:11

Rob N


1 Answers

The com.apple.eawt classes are indeed included with the Oracle JDKs from 7u4 up through the latest (as of 10/30/2012) 7u9. For some example usage, see Fullscreen feature for Java Apps on OSX Lion or FullScreen Swing Components Fail to Receive Keyboard Input on Java 7 on Mac OS X Mountain Lion

One issue is that they do not seem to be building javadoc for those classes at the moment, so looking up the latest APIs is fairly difficult. I've resorted to searching for the .java files online. You may also have some luck with the older API reference on developer.apple.com, though this does not include newer classes like FullScreenUtilities.

like image 161
Vermillion002 Avatar answered Nov 08 '22 07:11

Vermillion002