Setting it programmatically is possible:

System.setProperty("java.io.tmpdir", System.getProperty("user.home") + "/tmpdir");

Is there any way to set system property, which references another system property as jvm option? (with either implicitly or explicitly set referenced property)

I tried:

  • -Djava.io.tmpdir=$user.home/tmpdir
  • -Djava.io.tmpdir=${user.home}/tmpdir
  • -Djava.io.tmpdir=-Duser.home/tmpdir
  • -Dtest.ref=/home/wort -Djava.io.tmpdir=-Dtest.ref/test
  • -Dtest.ref=/home/wort -Djava.io.tmpdir=$test.ref/test
0

There are 0 best solutions below