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: Java JAR application bundle question




On Jan 11, 2007, at 10:23 PM, Ben Galbraith wrote:


One other possibility:
  LS may not update its database until a change occurs to the .app
directory itself.  Moving and copying things inside the Contents dir
doesn't change the mod-date of Alex.app.  Try this command:
  touch Alex.app

Sweet, okay.

....and later...
I finally got "Alex.app" to work dragging the "Contents" folder from
"Small.app" in the Finder over the version that was in "Alex.app" and
overwriting it when Finder prompted me. After that, double- clicking on
Alex.app launched it. I have NO idea what to make of that.

Moving/replacing Contents caused a change to the mod-date of the target
Alex.app folder, which caused LS to update its database by reading the new
Info.plist and stuff.

Okay.

It there some kind of magic incantation one has to perform on a "Contents"
directory at some point? The permissions were *exactly* the same.

The 'touch' of the Alex.app dir should do it.

Okay.

If you want to automate the building your your app-bundle, use the Jar
Bundler Ant task. Unless you're not using Ant to build, in which case
you'll have to describe exactly what you mean by "automate".

Ah, okay. I'll take a look at that. I'm a nuts-and-bolts kinda guy, and I like to avoid black boxes, but at this point, any port in a storm...

I'm still not entirely sure I've followed what was wrong, and what was tried. But if it had something to do with the LaunchServices out- of-sync problems then manually messing around with the contents of an application bundle is probably what caused it and will almost certainly not fix it.


'touch' does not always work.

There are no LaunchServices API's to fix it. I'd like to hear I'm wrong on this. There did appear to be one or two 3rd party packages that seemed like they might handle the issues but none that I remember appeared to be free-ware or open source.

Duplicating the application should about always work. I think once or twice I might of had to throw in a re-boot. It was ultimately what I was going to resort to for my LaunchServices based application using Runtime exec. That is what I do anyhow when I have problems and it didn't seem to provide a real pressing need for a stand-alone application which is where some of my interest in my LaunchServices API application waned. Initially I thought I would find some way through the LS API's to handle all of this.
Building from scratch would probably also about always avoid the issues- rather than piece-meal tinkering with application bundle contents. So a build process, probably ant based, might be the ounce of prevention worth the pound of cure.



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: Java JAR application bundle question (From: Greg Guerin <email@hidden>)
 >Re: Java JAR application bundle question (From: Ben Galbraith <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.