How to set java.io.tmpdir
using Quarkus in native mode in a container.
I've tried different options but didn't manage to have the Files. createTempDirectory
use my own value:
TMPDIR as env
-> not workingENTRYPOINT ./application -Dquarkus.http.host=0.0.0.0 -Djava.io.tmpdir=${TMPDIR:-/tmp}
-> works where it is not staticI should probably set TempFileHelper.tmpdir
as runtime init?
There's a bug open in graalvm about this issue: https://github.com/oracle/graal/issues/7731
The person who reported the bug mentioned just last week (on Mar 6 2025) that it was fixed in Java version: 25+11-LTS, vendor version: Oracle GraalVM 25-dev+11.1
.
You'll need to downgrade or upgrade the version of graalvm you are using to avoid this bug.