| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi everybody,
http://lists.apple.com/archives/Java-dev/2007/Feb/msg00294.html
best regards,
Florian
Florian Bruckner wrote:
The application is plain Swing, there is only a single snippet of code that is using Cocoa API
So, from my point of view, this should not be able to cause the "garbage collected java ref", as we work with hard references from a Java point of view and keep references to the cocoa objects in code, but I may very well be wrong, as I do not have experience with this API.
The Cocoa-Java classes are not intended for use in Swing programs -- this is all the com.apple.cocoa... packages. They are only safe to use in pure Cocoa-Java apps. Many of the methods are only safe to call from the AppKit thread -- which is inaccessible to a pure Swing/Java app. The symptoms of misusing these methods are deadlocks and crashes. These packages are all deprecated by Apple, and will be removed in some future release (or so they tell us).
Rework the Cocoa-Java code to use JNI and Objective-C, and use NSObject performSelectorOnMainThread to get onto the AppKit thread. Since you're already running native code, you might as well use JAWT to get at the native Cocoa objects, and perform your operations there.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
-- 3Kraft Software | Applications | Development Wasagasse 26/2 1090 Vienna Austria
Phone: +43 (0)1 920 45 49 Fax: +43 (0)1 920 45 49 Mobile: +43 (699) 102 53 901 E-Mail: email@hidden Web: http://www.3kraft.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden
| References: | |
| >Re: mysterious Java application crash (From: Doug Zwick <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.