← Back to team overview

openjdk team mailing list archive

Bug#686073: Bug#686073: openjdk-7-jre: default value of java.io.tmpdir is not affected by TMP/TMPDIR/TEMP/TEMPDIR

 

Hi Paul,

Le mardi 28 août 2012 11:54:42, Paul Wise a écrit :
> I use libpam-tmpdir to separate user's temporary files into different
> directories. Unfortunately Java programs seem to ignore the all of the
> environment variables (TMP TMPDIR TEMP TEMPDIR) that libpam-tmpdir sets.
> The default value of java.io.tmpdir appears to be hardcoded to /tmp/.

You're right OpenJDK doesn't take into account any TMP* env variable. In 
os_linux.cpp file [1], tmpdir is explicitely set to :
const char* os::get_temp_directory() { return "/tmp"; }

There was a dicussion last year on this subject upstream [2] but there was no 
clear conclusion.

[1] http://hg.openjdk.java.net/jdk7u/jdk7u-
dev/hotspot/file/baaa29c3d798/src/os/linux/vm/os_linux.cpp
[2] http://thread.gmane.org/gmane.comp.java.openjdk.hotspot.runtime.devel/1731

Cheers,
-- 
Damien - Debian Developper
http://wiki.debian.org/DamienRaudeMorvan

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References