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



Ben Galbraith wrote:

>That's a clever use of the standard extensions class loader.

Yeah, but after I thought about, I believe adding a Class-Path attribute to
the app's manifest is a better strategy.


>I actually tried to run a very simple class that just printed an
>entry to the console and references no other classes, just put it in
>the classpath, and double-clicked on the app. It failed, too.

I think you may have missed my point.  If your Info.plist ClassPath is very
long, then it doesn't matter whether your app-jar is just a single
HelloWorld class or not.  The JVM is failing before it ever gets to your
class, due to the length of the classpath.  At least that's the hypothesis.

To test this, you have to remove everything from the Info.plist ClassPath
except the one jar with one class.

Also, the failure may not be in the JVM, but in the launcher stub that
parses Info.plist.  It might have a length limitation that the JVM itself
doesn't.

By the way, what was your command-line when it worked?  Did it also have a
long classpath?  If so, did it use relative or absolute pathnames?


>I was hoping folks would say, oh yeah, just use the Launch Services
>Debug Widget, it'll tell you exactly what's wrong. Oh well. I guess
>I'm reduced to just fumbling around some more, perhaps rebuilding the
>Info.plist from scratch, to see what the #($*#)( is the matter.

You could try something more systematic, such as pointing
CFBundleExectuable to a shell script with chmod a+x, just to see if it's
launching.  If so, then you know it's not Launch Services.


>Hey, how does Launch Services uniquely identify an app? I assume not
>by file name but by some identifier in Info.plist, yeah?

Search ADC for keywords Launch Services:
  <http://developer.apple.com/search/search.html>

  -- 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



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.