Skip to content

Commit a051f5c

Browse files
committed
Added support for Android with api version below 26.
Api versions below 26 doesn't support java.nio.file
1 parent d2f6e67 commit a051f5c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/org/scijava/nativelib/BaseJniExtractor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import java.io.InputStreamReader;
4646
import java.io.OutputStream;
4747
import java.net.URL;
48-
import java.nio.file.Files;
4948
import java.util.Enumeration;
5049

5150
import org.slf4j.Logger;
@@ -122,7 +121,10 @@ protected static File getTempDir() throws IOException {
122121
if (!tmpDir.isDirectory())
123122
throw new IOException("Unable to create temporary directory " + tmpDir);
124123
}
125-
return Files.createTempDirectory(tmpDir.toPath(), TMP_PREFIX).toFile();
124+
125+
File tempFile = File.createTempFile(TMP_PREFIX, "");
126+
tempFile.delete();
127+
return tempFile;
126128
}
127129

128130
/**

0 commit comments

Comments
 (0)