Skip to content

Commit 0f17b00

Browse files
JNI library loading uses a predetermined file name (#652)
## Usage and product changes The unpacked JNI library now uses a pre-determined filename. This replaces logic to extract the filename from the packaged resource. ## Implementation The new method produces the same filename, since the way we find the resource is through the filename in the first place.
1 parent 66b096d commit 0f17b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/common/Loader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private static Path unpackNativeLibrary() throws IOException {
9292
private static Path unpackNativeResources(URL resourceURL) throws IOException {
9393
Path tempPath = Files.createTempDirectory("typedb-driver-lib");
9494
tempPath.toFile().deleteOnExit();
95-
Path newPath = tempPath.resolve(Path.of(resourceURL.getPath()).getFileName().toString());
95+
Path newPath = tempPath.resolve(DRIVER_JNI_LIBRARY_NAME);
9696
Files.copy(resourceURL.openStream(), newPath);
9797
newPath.toFile().deleteOnExit();
9898
return newPath;

0 commit comments

Comments
 (0)