maybe stupid question but i\'m getting randomly following error when running my *.jar package. Sometimes programm runs flawlessly and sometimes interrupts putting this out i
I know that this is an old thread but just in case someone fails in the same error.
This is a multi-threading issue with a native library you are using.
To cut the long story short, the java loads the native library into memory then it is accessed by multiple threads at the same time, then this error pops up.
A quick workaround for this issue is to mark the method that generating this error as synchronized
.
It is not possible to run such native library in multi-threading environment.
Your options are:
Credits: Load the same dynamic library in two threads (both threads in the same JVM)