Change tmp directory with jenkins.jar

Hello,

I just downloaded a jenkins.war 2.401.3 on a RedHat 7 environment.
I use OpenJDK 11.0.20.
I try to launch my Jenkins with

java -jar ~/jenkins.war

But I immediately get an error

Running from: /opt/jenkins/jenkins.war
webroot: /opt/jenkins/war
Exception in thread "main" java.io.UncheckedIOException: java.io.IOException: No space left on device

Because Jenkins tries to create files in /tmp directory, which is full on my system.
Is there a way to specify a different tmpdir at launch ?

Stack overflow has a good summary of alternatives at:

The key step is to add a property java.io.tmpdir with the directory that will be the temporary directory.

Having a full temporary directory on a Linux system is usually a very bad thing. You probably want to fix that.

The Jenkins end of life operating system blog post will tell you why you should not use Red Hat Enterprise Linux 7.

Thanks for the detailed answer, Mark !
You are absolutely right. I contacted my IT, and they fixed the full temporary directory. Now, Jenkins is running fine (so I didn’t have to test the /tmp dir location workaround).
I also told them about RH7 EOL.