----- Original Message -----
From: "Roby Sherman" <email@hidden>
To: "Florijan Stamenkovic" <email@hidden>
Cc: "JavaDev" <email@hidden>
Sent: Sunday, June 29, 2008 6:20 PM
Subject: Re: Getting my Java App's "name.app" at runtime.
Thanks for the reply. Unfortunately, the mini-app is standalone so I'm
still stuck. :)
What is the "little bit of code" that deploys the application.
If its done from the main application, ie your own jarbundler, then why cant
you remember the location.
... its a strange requirement... "A user is going to stick a file, somewhere
on disk, and call it something unknown, how do I find it" ha ha
There has to be some kind of registry... either you create the application
and remember where you put it, and the name... or the application has to run
once on its own and register itself somewhere... the JNDI idea.
Heres a crazy thought.. the user (you give them the code) creates a file
association... from your program, you create a file called "loco.miniapp",
and launch it.
The users app will run it and put its own location (got from the classloader
as suggested before) and puts it in the file. Your app reads it and gets the
location... but this will only work for one self discovering application.
Then you getting OS specific, I assume apple only is ok.
I have no idea what you trying to do... but think about this, Java does have
an Ex classloader mechanism, Apple probably has it own way of doing it.
But the idea is that the Java bundle becomes just a "link" to the app...
your application can see the classes in the "plugin app", which is stored
externally, and the app name is now the class name which can be kept simple
like.... "my.app.start"... and thats what the user types into the main app.
Then your user app can use those class loader tricks to discover the
location. Probably the way to go, because it will work on any OS.
Just need to find out how that works on Apple... on other systems the user
just needs to drop the Jar into the Ex folder in the JRE...
Dont worry... its got to be easier than finding oil ;)
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