Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referencing home dir from Info.plist




On May 31, 2006, at 6:16 PM, Greg Guerin wrote:


I don't quite see how writing a Java wrapper would be any better, and it
could be worse, because it probably takes longer to launch 'java' than it
does to run a shell script.

It's not that bad. Although I have no definite numbers to defend it either. I run a application where the JavaApplicationStub effectively launches a small java launcher, or wrapper, that in turn java runtime exec's the application proper, which actually itself java runtime exec's an additional application 'plugin'. It doesn't really seem to take that terribly long but I haven't done any time comparisons to a normal single launch startup .
It works by adding an extra dictionary to the Info.plist that is used in the second 'bootstrap' launch. This is based on the Info.plist and also the jakarta commons launcher code. Tomcat I think uses a variation of the same code base but of course that is a server where the up time is supposed to be long enough that a somewhat slow launch probably isn't too much of a concern.
Another possibility would be - assuming write access to the plist - update it on the fly, either only one time setting a persistent preference of some sort indicating it's been done. Or read the plist and check it and update as needed on each launch. My code relies on successfully parsing the plist each launch and also supports writing it back out. I don't do the write back currently although I also don't run it from a write protected directory so it would in theory be possible.
Part of the point of the exercise was that it makes the launch more flexible, you have complete control over the runtimed launch, you have control otherwise over what JavaApplicationStub lets you control. Also it makes the Info.plist the basis of a pure java launcher, so cross-platform to some extent, although I haven't tried it yet anywhere else. If thats a plus probably depends on whether you really like the XML based Info.plist configuration for a launch. I'd still have to come up with a shell or bat seed launcher for the other platforms as well. Don't know much about them.


Mike Hall        mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall
http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Re: Referencing home dir from Info.plist (From: Greg Guerin <email@hidden>)



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.