Why will MATLAB not start up properly on my Linux machine?
Show older comments
MATLAB will not start up on my Linux machine and I am not getting license manager errors.
Accepted Answer
More Answers (1)
Steph Bredenhann
on 15 Dec 2024
0 votes
Please commands issue by, I can't start matalb R2024b on Ubuntu 24.04LTS
None of the files:
~/matlab_crash_dump.XXX
~/java.log.XXX
~/hs_err_pid#.log
I see from Google search that this is a common problem, please assist, I am desparate.
steph@sjb-pc:$ matlab
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.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
steph@sjb-pc:$ cd /usr/local/MATLAB/R2024b/bin/
steph@sjb-pc:$ matlab -nodesktop
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.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
steph@sjb-pc:$ matlab -jvm
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.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
steph@sjb-pc:$ matlab -nodisplay
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.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
steph@sjb-pc:$ pwd
/usr/local/MATLAB/R2024b/bin
steph@sjb-pc:$ cd ~
steph@sjb-pc:$ pwd
/home/steph
5 Comments
Star Strider
on 15 Dec 2024
Edited: Star Strider
on 15 Dec 2024
How did you install MATLAB?
That may be the actual problem. When I installed it, I first needed to create /home/<username>/usr/local/MATLAB using sudo, then the installer did the rest.
For you, the directory path probably needs to be /home/steph/usr/local/MATLAB. The installer will choose the directory path structure, incuding your user name, however if will likely need you to create the directory path first.
After that, launching it was straightforward. I use the MATLAB file that I access by right-clicking on the 'Files' icon in the left toolstrip to bring up the Home directory, then navigating to usr then local . Right-clicking on matlab and choosing 'Run as a Program' from the dropdown menu always works for me.
(I needed help with this, since I'm relatively new with Ubuntu Linux and as usual, MathWorks Support came through. Updating it was another problem, however that got solved with the assistance of MathWorks Support.)
The directory I use to launch MATLAB --

.
EDIT -- Corrected typographical errors.
Steph Bredenhann
on 16 Dec 2024
Star Strider:
I have installed Matlab as per the instructions, using ./install after unzipping the downloaded file. It was installed to /usr/local/MATLAB/R2024b which is the default directory.
Star Strider
on 16 Dec 2024
@Steph Bredenhann — I have the same version of Linux as you reported, and I have never had any problems with it, once installed.
I fiirst created the path using:
sudo mkdir -p Home/usr/local/MATLAB
since the installer reported an error in not being able to create the path by itself. (I believe that is the command I used.) Then, I downloaded the installer from Download Products and then clicked on the ‘Download for Linux’ link. After that, I clicked the path I created, and the download proceeded on its own.
I only ran into one problem that being with Simulink not being able to find a C compiler. My HP laptop came with Ubuntu preinstalled, and includes an appropriate compiiler. I still have to complete the Simulink setup with it.
Steph Bredenhann
on 16 Dec 2024
@Star Strider, I followed the same procedure, except I didn't create the usr/local/MATLAB in my home folder, MATLAB created the folder under /usr directory, thus usr/local/MATLAB. The only difference between your installation and my installation is that you created a folder in your home directory. I wouldn't use sudo to create directories in my home directory, it defeats the purpose of a home directory. However, I'll give your way of doing the installation some thought, that you very much for your input, I appreciate it.
Star Strider
on 16 Dec 2024
Edited: Star Strider
on 17 Dec 2024
@Steph Bredenhann — My pleasure!
When I had problems installing MATLAB iniitially, I contacted MathWorks Support, and they suggested doing what I outlined. I did, and I’ve not had any problems since. You might check to see where the Java files are in your installation.
EDIT — (17 Dec 2024 at 2:25)
During the installation process, the installer should have given you the option to change the directory you want MATLAB installed in. If you want to install it in something other than Home/usr/local/MATLAB (that was its preference when I installed it, so the one I went with), first create the path and then try the installation again with the path you want.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!