diff options
| author | J08nY | 2024-03-25 15:07:53 +0100 |
|---|---|---|
| committer | J08nY | 2024-03-25 18:41:11 +0100 |
| commit | e8cd86bb309cf90ec5e2aa211a765d3da45590b4 (patch) | |
| tree | 09e98061c9cae4f52f727a1787f4fb6360bacb37 /standalone/src | |
| parent | c01f16cbacb45682547e4712bdae854c56604e61 (diff) | |
| download | ECTester-e8cd86bb309cf90ec5e2aa211a765d3da45590b4.tar.gz ECTester-e8cd86bb309cf90ec5e2aa211a765d3da45590b4.tar.zst ECTester-e8cd86bb309cf90ec5e2aa211a765d3da45590b4.zip | |
Diffstat (limited to 'standalone/src')
| -rw-r--r-- | standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java index db85b02..2f469aa 100644 --- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java +++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/NativeECLibrary.java @@ -34,7 +34,11 @@ public abstract class NativeECLibrary extends ProviderECLibrary { Path libPath = libDir.resolve(resource + "." + suffix); /* Write the shim. */ - FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + resource + "." + suffix, libPath); + boolean found = FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + resource + "." + suffix, libPath); + if (!found) { + //System.err.printf("Resource %s not found.\n", resource); + return false; + } /* Load the requirements, if they are bundled, write them in and load them. */ try { @@ -42,13 +46,19 @@ public abstract class NativeECLibrary extends ProviderECLibrary { if (requirement.endsWith(suffix)) { /* The requirement is bundled, write it */ Path reqPath = libReqDir.resolve(requirement); - FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + requirement, reqPath); + found = FileUtil.writeNewer(ECTesterStandalone.LIB_RESOURCE_DIR + requirement, reqPath); + if (!found) { + //System.err.printf("Requirement %s not found for %s.\n", requirement, resource); + return false; + } System.load(reqPath.toString()); } else { System.loadLibrary(requirement); } } } catch (UnsatisfiedLinkError ule) { + System.err.println(resource); + ule.printStackTrace(); return false; } @@ -57,6 +67,8 @@ public abstract class NativeECLibrary extends ProviderECLibrary { provider = createProvider(); return super.initialize(); } catch (IOException | UnsatisfiedLinkError ignored) { + System.err.println(resource); + ignored.printStackTrace(); } return false; } |
