Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Getting my Java App's "name.app" at runtime.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting my Java App's "name.app" at runtime.



Roby,

Assuming that you would want to get it during another execution of the "big" app, you could set a preference (java.util.prefs.*) in your big app that would contain the name of the small one. Or the full path to it. Or you could have that preference in your small app, if you need it during it's execution. Possibly you could also set the preference for the big app, but also access it from the small app.

As far as I know the Java API does not provide anything to let you find out the name of the app bundling it.

F

On Jun 29, 2008, at 10:49, Roby Sherman wrote:

Hi folks,

I've got a piece of Java code that allows users to deploy a custom mini Application (which is basically another Java program). I want to give the user the ability to call the mini-Java program AnythingTheyWant.app, but in order to do that, I need a way to get the name of what they call this application so I can point to files inside it's hierarchy (e.g. HTML pages, etc).

Of when executed from the Finder the miniapp's, user.dir gives me the path just before the .app directory (e.g. "/Applications") but not the app name itself. Any suggestions on how I might get this information?

Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
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: This email sent to email@hidden
References: 
 >Getting my Java App's "name.app" at runtime. (From: Roby Sherman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.