| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Jan 28, 2007, at 12:01 PM, Brian Arnold wrote:
I should have posted something about this earlier, as I believe there was a separate question about Carbon apps. We DO NOT currently support embedding the Java VM in a Carbon application. The AWT makes a lot of assumptions about its environment. If it doesn't find an NSApplication, it creates its own instance of a custom subclass, and then sets up an NSApplication delegate so it can listen for the open, print and quit events. That subclass also creates the main and application menu from its default nib. This is important because the Java menu implementation works with NSApplication to get the application's menubar (using [NSApp mainMenu]), and can then add and remove menus from that. When you create an NSApplication using NSApplicationLoad() the AWT assumes it is embedded in another application, because it's going to find a 'running' NSApplication when it loads. When that happens, none of the additional setup happens, because the host app did it already. We are very much aware that there's a lot of interest in putting Java into your Carbon application, but right now there aren't any good workarounds. You could probably get somewhere with the menu issues by creating an NSMenu yourself and install it as the menu bar for the app you created with NSApplicationLoad. That won't help with the application events, however, but should make your Java menus appear. Scott ------------------ Scott Kovatch Apple Inc. Java Runtime Classes Cleveland Hts, OH email@hidden I am Scott Kovatch, and I approved this message. |
_______________________________________________ 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
| References: | |
| >Trying to get Carbon-based code to not break Java JVM (From: Brian Arnold <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.