I wonder if one can let the user specify an installation directory for an application served by a JNLP file? For example:
INSTALLDIR: C:\Program Files\MyCompany\My Program\
Is that also possible to mention a data folder to be downloaded with the jnlp application jars in INSTALLDIR/data?
The user or their system administrator can configure the location of the cache using the Java Control Panel.
There is no existing functionality, but if you can write Java code to achieve that, add it to a JNLP installer extension and that code will be called when the app. is first run. Here is a demo. of using the extension installer service.
Your fears are well founded, but there is a subtle implication you seem to have missed. Not only that, but even if it were possbile to find that directory in your app. (it is not possible for an applet or JWS app. to discover that information), it might be changed at any moment by the user (or their system administrator).
What I’ve been hoping you would infer from my messages so far is this. If your app. relies on knowing the installation directory, it is seriously broken. Fix that first.