I feel very much like an audience member watching "The Prestige" when
Christian Bale's character asks, "Are you watching closely?"
I copied an existing Java ".app" that works by:
1. Making a new directory in /Applications: "mkdir Small.app"
2. Copying everything from the old app to the new directory: "cp -r
iCal\ Helper.app/* Small.app"
3. Creating a new class file that just prints two lines to the
console using STDERR and STDOUT.
4. JAR'ing it up and placing it in Small.app/Contents/Resources/Java
5. Editing Small.app/Contents/Info.plist to reference add that JAR to
the class path and execute the class
Everything worked great.
I then decided to take my existing "Alex.app" that lives in ~/source/
java/alex that isn't working and systemically turning it into a copy
of Small.app to see at want point it starts working. *It never
started working.*
I did the following:
1. Deleted everything from Alex.app/Contents/Resources/Java
2. Copied Small.app/Contents/Resources/Java to Alex.app/Contents/
Resources/Java
3. Copied Small.app/Contents/Info.plist to Alex.app/Contents/Info.plist
4. Ran Alex.app. Nothing happened.
5. Deleted alex.icns from Alex.app/Contents/Resources and copied the
icons from Small.app/Contents/Resources to Alex.app/Contents/Resources
6. Ran Alex.app. Nothing happened.
7. Copied Small.app from /Applications to ~/source/java/alex. Ran
Small.app. It worked just as it did when it was in /Applications.
8. Copied Alex.app into /Applications. Ran Alex.app. Nothing happened.
9. Copied Small.app/Contents/MacOS/* into Alex.app/Contents/MacOS/*
as they were different versions of JavaApplicationStub (Alex.app's
was newer). Ran Alex.app. Nothing happened.
10. Checked every directory and every file in Alex.app and Small.app
to make sure they are byte-for-byte identical. They are.
11. Created a new directory in ~/source/java/alex: "Alex2.app".
Copied Alex.app/* into it. Ran Alex2.app. Nothing happened.
Just to be clear, when I say "nothing happened" above, I mean that no
new entries appeared in console.log as viewed by Console.app. I
frequently reloaded and also re-ran Small.app as sanity checks
frequently as part of this process to verify that Console.app was
working (and that Small.app didn't stop working).
I'm very, very stumped at this point. Clearly, something funky is
happening behind the scenes of which I know absolutely nothing as
this behavior seems very irrational to me.
Help?
I realize I could just use "Small.app", the app that works, as a
potential template for my application bundle since it launches, but
as I'm trying to automate the build of my bundle, I want to know
exactly what is causing this process to fail so I'm not in this
situation at some point in the future. And frankly, at this point, I
just want to know.
Ben
On Jan 11, 2007, at 4:08 PM, Greg Guerin wrote:
Ben Galbraith wrote:
No worries -- that is exactly what I tried -- removing everything
but the
one JAR containing the one class.
I'm still uncertain from your wording whether you reduced the size
of the
ClassPath key in Info.plist or not. That's the change I've
suggested, not
simply the removal of jars.
If it still doesn't work, try posting the Info.plist from the
reduced-size
app that doesn't work. Also please include an 'ls -laR ' done on the
top-level .app directory. There may be a structural reason it's
failing.
I suppose it's too late to ask what changes you made right before it
stopped working, or whether there's a backup version of the app
before any
changes were made. The value of backups increases exponentially
with their
unobtainability.
-- GG
_______________________________________________
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
_______________________________________________
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