Error on startup : Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.
I am on Manjaro Linux and I installed Matlab R2024b.
When trying to start Matlab, I get the following error :
Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.
java.lang.NoClassDefFoundError: com/mathworks/jmi/OpaqueJavaInterface
Caused by: java.lang.ClassNotFoundException: com.mathworks.jmi.OpaqueJavaInterface
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
I tried changing the java version used by using matlab_jenv to switch to the default version on my machine, 1.7. It did not make a difference. Command:
sudo ./matlab_jenv -allusers system 1 ✘
Result: 1 ✘
JavaEnvironment with properties
Version : openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11)
OpenJDK 64-Bit Server VM (build 17.0.13+11, mixed mode, sharing)
Home : /usr/lib/jvm/java-17-openjdk
Library : /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so
Configuration : system
I tried creating a java.opts file as suggested here. It did not make a difference.
I tried uninstalling and reinstalling matlab. It did not make a difference.
I had never set a MATLAB_JAVA variable, setting/unsetting it does not make a difference.
Any advice appreciated.I am on Manjaro Linux and I installed Matlab R2024b.
When trying to start Matlab, I get the following error :
Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.
java.lang.NoClassDefFoundError: com/mathworks/jmi/OpaqueJavaInterface
Caused by: java.lang.ClassNotFoundException: com.mathworks.jmi.OpaqueJavaInterface
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
I tried changing the java version used by using matlab_jenv to switch to the default version on my machine, 1.7. It did not make a difference. Command:
sudo ./matlab_jenv -allusers system 1 ✘
Result: 1 ✘
JavaEnvironment with properties
Version : openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11)
OpenJDK 64-Bit Server VM (build 17.0.13+11, mixed mode, sharing)
Home : /usr/lib/jvm/java-17-openjdk
Library : /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so
Configuration : system
I tried creating a java.opts file as suggested here. It did not make a difference.
I tried uninstalling and reinstalling matlab. It did not make a difference.
I had never set a MATLAB_JAVA variable, setting/unsetting it does not make a difference.
Any advice appreciated. I am on Manjaro Linux and I installed Matlab R2024b.
When trying to start Matlab, I get the following error :
Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.
java.lang.NoClassDefFoundError: com/mathworks/jmi/OpaqueJavaInterface
Caused by: java.lang.ClassNotFoundException: com.mathworks.jmi.OpaqueJavaInterface
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
I tried changing the java version used by using matlab_jenv to switch to the default version on my machine, 1.7. It did not make a difference. Command:
sudo ./matlab_jenv -allusers system 1 ✘
Result: 1 ✘
JavaEnvironment with properties
Version : openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11)
OpenJDK 64-Bit Server VM (build 17.0.13+11, mixed mode, sharing)
Home : /usr/lib/jvm/java-17-openjdk
Library : /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so
Configuration : system
I tried creating a java.opts file as suggested here. It did not make a difference.
I tried uninstalling and reinstalling matlab. It did not make a difference.
I had never set a MATLAB_JAVA variable, setting/unsetting it does not make a difference.
Any advice appreciated. installation, error, java MATLAB Answers — New Questions