I’ll preface this with two notes: 1) I know very little about Java. 2) What I am about to ask for is almost certainly a horrible hack.
I have an application I did not write, and I have no control over the code. It runs on (among other things) a Linux machine. It stores its preferences (presumably using the Preferences API, about which I know nothing) in a structure under $HOME/.java/.userPrefs/...
My problem is that I want to run more than one instance of this code, with different preferences in each instance. Is it possible to tell the Java interpreter to use an alternate location to store preferences, either using a command-line argument or an environment variable?
Edit: I’ll add the additional stipulation that each of the instances needs to run under the same user, with access to the same (non-preferences) files.
The answer appears to be “it can’t be done.”