Matlab startup error(s): says license username doesn't match but it does; plus java issues

5 views (last 30 days)
Hi, I have been having numerous errors attempting to download and start R2018b on Linux ubuntu 16.04. At first it was storage so I moved the matlab root folder from default to: '/mnt/data/<user>/MATLAB'. So I have it downloaded and activated, but it was searching for the license in the wrong location, so I moved it and told it to look in a difference location using ./matlab -c command. However, now it seems there is a licensing error, even though I did activate using the same username as my profile name:
License checkout failed.
License Manager Error -9
Your username does not match the username in the license file.
To run MATLAB on this computer, you must run the Activation client to reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/R2018b/9
Diagnostic Information:
Feature: MATLAB
License path: /mnt/data/<user>/MATLAB/licenses/license_<computername>_<licensenum>_R2018b.lic
Licensing error: -9,57.
I can open Matlab through terminal using -nodesktop but if I open it with a desktop, I also get an excessive amount of java errors, such as:
java.lang.NoClassDefFoundError: Could not initialize class
......
Exception in thread "AWT-EventQueue-0": java.lang.UnsupportedClassVersionError: com/mathworks/search/SearchField : Unsupported major.minor version 52.0
......
Sometimes it will freeze on the splash as well. I have seen all of these issues individually in other posts, yes, but I have been unable to solve them with any suggestions so far. Does this have something to do with moving the location of the download from default? From moving licenses? Any help appreciated!!!

Answers (1)

Karan Singh
Karan Singh on 3 Feb 2025
For licensing issues, you can directly contact MathWorks Support, as they are best equipped to handle such cases. You can reach them here: MathWorks Support.
Now, while the errors you’re seeing at startup may be related to licensing issues, the "NoClassDefFoundError" is a specific Java error related to static class initialization. I have some steps for windows as I don't use linux but you can try to get some equivalent of the same? Try the following steps:
1. Disable the Java Access Bridge software
  • Close MATLAB if it is running.
  • Open the terminal and navigate to the MATLAB installation root.
  • Run the following command in the terminal:
sys\java\jre\win64\jre\bin\jabswitch.exe /disable
  • Open MATLAB and continue with your normal workflow. The error should be resolved.
2. If you use third-party accessibility software that relies on the Java Access Bridge, you can re-enable it after MATLAB starts by running:
sys\java\jre\win64\jre\bin\jabswitch.exe /enable
Karan

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!