code: public static File getTempDir(){
          String p = System.getProperty(ND4JSystemProperties.ND4J_TEMP_DIR_PROPERTY);
          if(p == null || p.isEmpty()){
              return new File(System.getProperty("java.io.tmpdir"));
          } else {
              return new File(p);
          }
      }
docs: Get the temporary directory. This is the location specified by {@link ND4JSystemProperties#ND4J_TEMP_DIR_PROPERTY} if set,
  or the default temporary directory (usually specified by java.io.tmpdir system property)
  @return Temporary directory