Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jSnapLoader: ConcurrentNativeBinaryLoader and multi-threading example #8

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions snaploader-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ tasks.register("TestZipExtractor") {
application.mainClass = 'com.avrsandbox.snaploader.examples.TestZipExtractor'
}

tasks.register("TestMultiThreading") {
application.mainClass = 'com.avrsandbox.snaploader.examples.TestMultiThreading'
}

dependencies {
implementation project(path: ':snaploader')
}
22 changes: 22 additions & 0 deletions snaploader-examples/errors/Filetooshort/Error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```java
Jul 16, 2023 12:02:22 PM com.avrsandbox.snaploader.NativeBinaryLoader loadBinary
SEVERE: Cannot load the dynamic library: /home/twisted/GradleProjects/jSnapLoader/snaploader-examples/libs/libjmealloc.so
java.lang.UnsatisfiedLinkError: /home/twisted/GradleProjects/jSnapLoader/snaploader-examples/libs/libjmealloc.so: /home/twisted/GradleProjects/jSnapLoader/snaploader-examples/libs/libjmealloc.so: file too short
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.avrsandbox.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:178)
at com.avrsandbox.snaploader.NativeBinaryLoader.lambda$cleanExtractBinary$0(NativeBinaryLoader.java:216)
at com.avrsandbox.snaploader.file.FileExtractor.extract(FileExtractor.java:102)
at com.avrsandbox.snaploader.file.ConcurrentFileExtractor.extract(ConcurrentFileExtractor.java:73)
at com.avrsandbox.snaploader.NativeBinaryLoader.cleanExtractBinary(NativeBinaryLoader.java:212)
at com.avrsandbox.snaploader.NativeBinaryLoader.incrementalExtractBinary(NativeBinaryLoader.java:200)
at com.avrsandbox.snaploader.NativeBinaryLoader.loadLinux(NativeBinaryLoader.java:132)
at com.avrsandbox.snaploader.NativeBinaryLoader.loadLibrary(NativeBinaryLoader.java:89)
at com.avrsandbox.snaploader.examples.TestMultiThreading$2.run(TestMultiThreading.java:67)
at java.base/java.lang.Thread.run(Thread.java:833)
```
Loading