[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] SWT, AWT compatibility on OS X 1.3 with JDK 1.4.x

I have an SWT application that needs to run on OSX 1.3 using Java 1.4.x. It loads material using AWT Color (no events needed.) Running headless would solve the UI thread deadlock bug just fine, and on OSX 1.4 this solution suffices, however I cannot find any documentation about whether/which version of Java 1.4 has been fixed to run on 1.3 with AWT headless. Note that I think AWT was *supposed* to run headless on all versions of 1.4, based on Apple's release notes, but actually performed a check for thread even when headless that causes a conflict. (See threads below for details.)

Relevant bugs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=54791 [AWT still on Carbon in JVM 1.3]

Can anyone tell me which/if an update for Java 1.4 on OSX 1.3 fixed the "not really headless" problem, or if there is another workaround? I did find a bug on the Apple site that seemed like it might be a work-around. Does anyone know if this would actually work:

Radar #2786861
A server application that uses AWT for image processing will get a dock icon even though no user interface was presented to the user. The application will also be quit when the user logs out.

The notion of a headless AWT isn't officially supported until Java 1.4. But there is a workaround. If you launch the java process from the command line, add -Dcom.apple.backgroundOnly=true. If you have packaged the application as double-clickable, you can set the standard Info.plist key LSBackgroundOnly to a string value of 1. These do not prevent the application from being quit when the user logs out, but they will suppress a dock entry and menu bar.

I'm not sure if this will cause the thread-verification to be avoided. Anyone know? Any other suggestions?

Shasta Willson
Lunar Logic