Search code examples
eclipsemulti-user

How to specify a unique java.io.tmpdir for each user of a multi-user Eclipse installation?


I have an Eclipse installation on a multi-user Linux system at /opt/eclipse/.

Unfortunately, because of a defect in m2eclipse-mavenarchiver, this plugin uses a folder in a system temporary directory that is common for all users (this manifests as a "permission denied" message for a pom.xml file).

I planned to specify a unique value for java.io.tmpdir in a common eclipse.ini based on a user name, but it turned out that it is not possible.

One option is to have a per-user installation of Eclipse where each eclipse.ini would have its own value of java.io.tmpdir (e.g., -Djava.io.tmpdir=/tmp/eclipse/john_doe).

Is that possible to have a single multi-user Eclipse installation but somehow specify a unique value for java.io.tmpdir for each user?


Solution

  • I suggested in my comment that you could make your own custom script to launch Eclipse. Even in a way that the same script may serve for every user:

    /opt/eclipse/eclipse -vmargs -Djava.io.tmpdir=/tmp/eclipse/$USER