JIRA] Commented: (MACOSX_PORT-105) Create a .jre bundle, suitable for embedding in a .app

Scott Kovatch scott.kovatch at oracle.com
Wed Jan 4 20:05:31 PST 2012


First off, the JIRA is open to all, so feel free to have discussions relevant to a specific bug in the comments.

Here's what I see happening in this area (or maybe better put, what I'd like to see happen):

The Xcode project that is currently checked in at jdk/src/macosx/bundle should be used as a template for building a bundled application. It will build the native portion of the launcher from source and also copy all of the needed jars and other resources needed for your application. This mostly works now. If you need to sign the app for submission to the app store, the native portion of the launcher has some problems that will keep the app from working in sandboxd and need to be fixed.

On Jan 4, 2012, at 7:08 PM, Michael Hall wrote:

> One question I think I had was what version of XCode is required? When I tried starting the JavaAppLauncher project with XCode it ended up with the events locked spinning wheel cursor. I have to assume I'm either software and/or hardware versions behind what I need. I could see the project contents but couldn't figure out how you would manage the embedding with a command line build.

I shouldn't guess, but I'm going to say 3.2.6 or later should be enough to open the project. As currently checked in, there are some folder references that need fixing.

What you would do for a command line build is use Xcode once to set up the project the way you want it and then use the 'xcodebuild' command to build it.

> From the JIRA comment is including a jre required? Every application will do this?

Yes, this is the current plan.

> I think I've also asked if a JavaApplicationStub like executable couldn't be provided? Which would launch the default installed, I guess in this case openjdk, jre.

We want to allow people to build a bundled Mac app on any platform. So, yes, we will need a pre-built binary of the native part of the application launcher, and an ant task or shell script that creates all of the directories and copies the bits into the right place.  This will give you a bundled app, but if you need to sign it you will still need to build on Mac OS X. You will also need to build the JRE on a Mac and put it someplace from which the other platform can copy it.

> Mike Swingler did tell me before that the ApplicationDelegate handled AppleEvent related stuff like file associations. I have noticed that is provided separately from the JavaAppLauncher XCode project. Any chance for a brief description of how that works?

Once the AWT and ApplicationDelegate classes are loaded the standard Cocoa mechanisms for handling file open events are used, and then your ApplicationListener is invoked. You don't need do anything in the app launcher other than quickly parse the Info.plist and start up the JVM so the AWT can respond to the AppleEvent.

> I guess unanswered is unanswered whether JIRA, list or Wiki. 
> New years wishes hoping sometime in the new year this information will be revealed to some users somewhere.

We're going to need to write a lot of documentation over the next few months. The wiki location identified in the bug is a good place to start.

-- Scott K.

------------------------
Scott Kovatch
Oracle
Pleasanton, CA


> 


More information about the macosx-port-dev mailing list