Is there an environment variable to set the temporary directory on debian based systems?
I have a java applet that uses that environement variable and it's getting confused when launching two instances of the same applet.
Is there an environment variable to set the temporary directory on debian based systems?
I have a java applet that uses that environement variable and it's getting confused when launching two instances of the same applet.
I am unsure if the java applet will actually look at the environment variables before it starts, but what you can do it edit /etc/profile and add the following lines:
To make it a true tmp directory (as in the files go away when the session is ended, you'll want to edit the user's .bash_logout as well as the skeleton .bash_logout (/etc/skel/.bash_logout) to include the following:
The logout portion is dangerous is the variable doesn't get set and your logged in as root! I wouldn't add this to the root account or anyone that is a member of the wheel group! Proceed at your own caution.
The file you are looking for is:
You have to set the TEMP variable like:
If you want
/home/user/tmp
to be cleaned on reboot, I suggest you add an@reboot
job to the user's personalcrontab
.In C, I would use the tmpfile() call for a posix system, which would avoid the collision. So I would look for a similar Java call before trying to implement it myself, if you haven't already.
Java uses the system property
java.io.tmpdir
to configure the temporary directory. A reasonable JRE will set that to a sensible value based on the system if not explicitly specified.For me this worked when i was trying to install a jar file using java.
I use a Red Hat Linux.
/apps/prod/tmp
being the new folder.Use that before running desired command.
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=1dab2wir99_201&_afrLoop=305930829027924#SYMPTOM
Eg: