Open HenrikBengtsson opened 2 years ago
Hmm... pushing and popping of _JAVA_OPTIONS
in Lmod was more complicated than I though, or I'm doing it all wrong. For some reason, it's not sufficient with pushenv()
- maybe because of all the conditional checks. To simplify this, I've added a standalone hidden java-tweaks
module to deal with this that other modules can depend on;
https://github.com/HenrikBengtsson/CBI-software/blob/master/CBI/java-tweaks/module.lua.tmpl
Issue
By default, Java does not respect
TMPDIR
, it's hardcoded to use/tmp
, cf. https://github.com/openjdk/jdk/blob/1a7b70a8be0a236b98925a8320d25d88a405d595/src/java.base/share/classes/java/io/File.java#L2106-L2107Reproducible example:
were
./tmpdir.class
was compiled as:Solution
Set:
Then, we get:
Suggestion
Set
_JAVA_OPTIONS
globally, e.g. in the built-in openjdk Lmod modules as: