Arsalan Ahmed
Arsalan Ahmed

Reputation: 383

Failed to find the re quired library mclmcrrt9_3.dll on java.library.path

I intend to convert my MATLAB code into java. I am following this official documentation. But after compiling using javac I am unable to run the final step. When I run this from cmd java -classpath .;"C:\Program Files\MATLAB\MATLAB Runtime\v93\toolbox\javabuilder\jar\javabuilder.jar";makesqr.jar getmagic 5

I get the error

Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the re
quired library mclmcrrt9_3.dll on java.library.path.
This library is typically installed along with MATLAB or the MATLAB Runtime. Its
 absence may indicate an issue with that installation or
the current path configuration, or a mismatch with the architecture of the Java
interpreter on the path.
MATLAB Runtime version this component is attempting to use: 9.3.
Java interpreter architecture: win32.

In my opinion this is a MATLAB Runtime error not a java error and I am not able to fix it.

My setup is as follows

I have installed the MATLAB Runtime using the online installer and C:\Program Files\MATLAB\MATLAB Runtime\v93\runtime\win64 is added to my PATH variable. So I am not sure what else do I need to do in order for step 17 to work. One thing I noticed is that the error message shows

Java interpreter architecture: win32.

I don't know why the architecture is shown as win32 even though all the software I have installed is for 64bit.

Upvotes: 0

Views: 2351

Answers (1)

Arsalan Ahmed
Arsalan Ahmed

Reputation: 383

After a few days I got back to this and found the problem. Thanks to this thread I rechecked the java installed on my machine. Turns out it was 32 bit and not 64 bit. After installing the correct version the problem was solved.

Upvotes: 0

Related Questions