MATLAB: Does “plottools” stall, and later it shows “java.lang​.Unsatisfi​edLinkErro​r” for “jxbrowser”

jxbrowserMATLABunsatisfiedlinkerror

I have just installed MATLAB R2019b on my computer, and my MATLAB freezes when I try to open "plottools" by running the command below. After 5-10 minutes MATLAB continues to run, and finally displays the "plottools".
>> plottools
I see an exception in service loop in file "C:\Users\matlabuser\AppData\Local\Temp\matlab_cmlink".
Message (2020/03/02 09:38:19.708): exception in service loop
Exception (2020/03/02 09:38:19.710):
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048)
at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
at java.util.concurrent.LinkedBlockingDeque.take(LinkedBlockingDeque.java:680)
at com.mathworks.cmlink.management.cache.queue.JobQueuingCmStatusCache.takeAllJobs(JobQueuingCmStatusCache.java:113)
at com.mathworks.cmlink.management.cache.queue.JobQueuingCmStatusCache.access$200(JobQueuingCmStatusCache.java:29)
at com.mathworks.cmlink.management.cache.queue.JobQueuingCmStatusCache$2.call(JobQueuingCmStatusCache.java:91)
at com.mathworks.cmlink.management.cache.queue.JobQueuingCmStatusCache$2.call(JobQueuingCmStatusCache.java:85)
at com.mathworks.toolbox.shared.computils.threads.WrappingExecutorService$WrappedCallable.call(WrappingExecutorService.java:93)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caught by: java.lang.Thread.getStackTrace : line 1559
I see the following exception message in MATLAB:
Exception in thread "IPC Process Thread" java.lang.UnsatisfiedLinkError: C:\Users\matlabuser\AppData\Local\Temp\jxbrowser-chromium-43.0.2357.52.5.4.3\data\Temp\jxbrowser-common64-b6d04ac2-5197-4ee2-b5e9-fc96fcd804fd.dll: Access denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.teamdev.jxbrowser.chromium.internal.LibraryLoader.loadLibrary(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.<init>(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.getInstance(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.ChromiumProcess.start(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.d.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
Why is this issue occurring?

Best Answer

The issue appears in that MATLAB has the "Access Denied" error for that ".dll" file. The issue may be due to incorrect permissions, where MATLAB may not have write/read/access permissions to "%TMP%\jxbrowser-chromium-43.0.2357.52.5.4.3\". Sometimes these issues can occur due to security software such as antivirus on the computer.
The most simple solutions to this issue are one of the following:
  1. Start MATLAB with Administrator privileges, so that MATLAB is able to access the files in the above mentioned directory.
  2. Change the permissions of the temporary folder "C:\Users\matlabuser\AppData\Local\Temp\jxbrowser-chromium-43.0.2357.52.5.4.3\" so that anyone can access, however, this may be a privacy concern.
This will resolve the issue with the "java.lang.UnsatisfiedLinkError", and MATLAB will show "plottools" much faster.
Related Question