Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I develop Apple Java Extensions on Windows?

When I do multi-platform testing on Windows it gets annoying that Eclipse shows errors in the project because of the com.apple.eawt code that I have in a special Mac customization task. Worse yet, if I export a runnable jar on Windows, it won't run on mac because of the unresolved compilation problems.

What's the best way to let Windows Java and com.apple.eawt live in peace? I can't see how I would be able to spin off the code to a jar, since it requires access to lots of the program's state.

like image 391
Yuvi Masory Avatar asked Jan 27 '10 23:01

Yuvi Masory


2 Answers

I created an updated jar to solve this problem. GitHub source here. It's hosted on maven central

like image 100
Yuvi Masory Avatar answered Sep 28 '22 11:09

Yuvi Masory


This looks like it could be what you're after: http://developer.apple.com/mac/library/samplecode/AppleJavaExtensions/

This is a pluggable jar of stub classes representing the new Apple eAWT and eIO APIs for Java 1.4 on Mac OS X. The purpose of these stubs is to allow for compilation of eAWT- or eIO-referencing code on platforms other than Mac OS X.

like image 33
matt Avatar answered Sep 28 '22 11:09

matt