Skip to content

Commit 3eafb65

Browse files
author
Neeme Praks
committed
NeuronRobotics#224 Allow to specify native library name via a system property (and skip auto-detection)
1 parent 7aa21d1 commit 3eafb65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/gnu/io/NativeResource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ private void inJarLoad(String name)throws UnsatisfiedLinkError, NativeResourceEx
104104

105105
private void loadLib(String name) throws NativeResourceException {
106106
try {
107+
String libNameFromClasspath = System.getProperty(name + ".classpathlib");
108+
if(libNameFromClasspath != null) {
109+
inJarLoad(libNameFromClasspath);
110+
return;
111+
}
107112
if(OSUtil.isARM()) {
108113
//System.err.println("Attempting arm variants");
109114
for(String libName : OSUtil.is64Bit() ? ARM64_LIBS : ARM32_LIBS) {

0 commit comments

Comments
 (0)