4

TestContainers have Native.java class, where it gets JNA props from "jna.tmpdir" key. How to override value of that key? like:

jna.tmpdir=/data/builds/compose-tmp 
java.io.tmpdir=/data/builds/compose-tmp

Part of code where it gets jna prop: 


package com.sun.jna;

public final class Native implements Version {

...

   static File getTempDir() throws IOException {
       File jnatmp;
       String prop = System.getProperty("jna.tmpdir");
       if (prop != null) {
           jnatmp = new File(prop);
           jnatmp.mkdirs();
       }
}
Seydazimov Nurbol
  • 1,404
  • 3
  • 10
  • 25
  • I'm also looking for an answer to a similar question. I'm facing issues with AppLocker and JNA temp files generated by a Java Application – user136819 Dec 14 '22 at 19:59
  • In our Windows server, the Java App generates the JNA DLL file into the current user's "temp" folder which is blocked by the AppLocker configuration. If possible, do refer my question here: https://stackoverflow.com/questions/74772475/windows-applocker-path-wildcards-for-files-and-folders/74781754?noredirect=1#comment131990919_74781754 – user136819 Dec 14 '22 at 20:16

0 Answers0