mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Loads ntcore from path if extracted load fails
There's a lot of buzz going around the internet about people trying to get ntcore working on other devices. One of the things that makes it harder is having to have a separate jar for each platform. What this change does is if the loading of the extracted library fails, it will attempt to load ntcore from the path. This means that a program like GRIP can just provide the libntcore.so and not have to worry about compiling different versions for different platforms.
This commit is contained in:
@@ -51,8 +51,11 @@ public class NetworkTablesJNI {
|
||||
os.close();
|
||||
is.close();
|
||||
}
|
||||
|
||||
System.load(jniLibrary.getAbsolutePath());
|
||||
try {
|
||||
System.load(jniLibrary.getAbsolutePath());
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.loadLibrary("ntcore");
|
||||
}
|
||||
} else {
|
||||
System.loadLibrary("ntcore");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user