Why will MATLAB not start up properly on my Windows based system?

2.921 views (last 30 days)
MATLAB will not start up on my Windows system, and I am not receiving license manager errors.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Jan 2023 at 5:00
Edited: MathWorks Support Team on 10 Jan 2023 at 15:20
If MATLAB is not launching properly, and you are not receiving any License Manager Errors, then you may be experiencing one of the following problems:
  • Corrupt preferences
  • Security software or other third party software interfering with MATLAB
  • Issue with Java environment
  • Installation directory
  • Username has a non-ASCII character
  • Single Sign-On (SSO) software interfering with MATLAB
  • Clearing the TEMP directory
Problem #1: Corrupt preferences
One of the most common reasons MATLAB will fail to start is that something has corrupted the MATLAB preferences directory. You will need to reset your preferences to fix this.
  1. Use the shortcut %AppData% from Windows Search to jump right to the current user's hidden AppData folder.
  2. Browse to the following folder: C:\Users\%username%\AppData\Roaming\MathWorks\MATLAB
  3. Rename the folder for your release of MATLAB, e.g R2022a to R2022a_old. Do not remove any folder that ends with "_licenses".
  4. Recreate the folder you renamed, e.g R2022a and leave it blank. Restart MATLAB.
The preferences will be regenerated automatically when you start MATLAB.
If you are using a roaming profile, please see the related article:
There will be some cases where the preferences directory is not being written to. In this case, you can set a MATLAB_PREFDIR environment variable to a temporary writable directory. Please see the article below for more details on how to set an environment variable. 
Problem #2: Security software or other third party software interfering with MATLAB
Check any of your security software logs to see if it is preventing MATLAB to start properly. Programs such as Symantec, McAfee, Kaspersky, AVAST, TrendMicro, BitDefender, and Webroot have all been known to prevent proper MATLAB startup. 
If necessary, set exceptions so that MATLAB can start. You may need to consult your IT staff or your security software vendor for assistance in creating exceptions. 
In some cases, startup issues that are caused by common antivirus software could be diagnosed using the Windows Error Reporting log files. These log files are located in the following directories and can be read with a text editor like WordPad:
Check the folders within this directory (eg: ReportArchive) for files either created around the time that MATLAB failed to startup or contain the name MATLAB or JAVA. 
Furthermore, Third-party software, such as AppSense, DeviceLock, NVIDIA RTX Desktop Manager Software, and LastPass has been known to cause issues. Disabling this software may resolve MATLAB startup issues.
Problem #3: Issue with Java environment
MATLAB has a command-line environment in addition to the normal MATLAB Desktop environment. This environment is not dependent on Java and can be useful for troubleshooting MATLAB. To launch MATLAB with no desktop environment:
  1. Right-click on the MATLAB shortcut and choose 'Properties'.
  2. Go to the end of the "Target" line, after MATLAB.exe, and add the flag -nodesktop. For example: "C:\Program Files\Matlab\R2022a\bin\matlab.exe" -nodesktop
  3. Press OK to save these changes.
  4. Try starting MATLAB again. If MATLAB starts, try running the command "desktop" to see if MATLAB will open in full mode.
  5. If this does not work, add the line -nojvm where -nodesktop previously existed and try to start MATLAB again.
  6. Finally, you can use the line -softwareopengl and try to start MATLAB again.
If MATLAB starts in either of these modes, this likely indicates a problem with your Java configuration. If MATLAB fails to start in either of these modes, more information may be obtained from the MATLAB crash dump files. To find these files, check your Temp folder:
The files will have names like:
Problem #4: Single Sign-On (SSO) software interfering with MATLAB
If the machine in question has SSO software installed, temporarily disable the SSO software then try to open MATLAB. If MATLAB launches, contact your IT department to allow/whitelist MATLAB from the SSO software, or disable SSO entirely.
Configure Oracle SSO to exclude MATLAB:
  1. Open the Oracle Enterprise Single Sign-On Administrative Console.
  2. Navigate to "Global Agent Settings" > "User Experience" > "Application Response".
  3. Locate the field that allows you to specify "Applications that hooks should ignore".
Problem #5: Installation directory
MATLAB may not start properly if it is not installed in its own contained folder or the folder contains non-ASCII characters. While non-default installation locations are fine, installing them into a directory with multiple non-MATLAB files in it can cause issues. For example, installing MATLAB directly into the C:\ drive will cause startup issues. Having MATLAB installed in a folder with non-ASCII characters will also cause startup issues.
For this reason, it is recommended you install in either the default location or have the installation folder prefaced with MATLAB.
If you are getting error messages related to:
Attempt to execute SCRIPT as a function.
It is the result of installing MATLAB directly to the C: drive. MATLAB must be uninstalled and then reinstalled to the default path, C:\Program Files\MATLAB.
Problem #6: Clearing the TEMP directory
Deleting everything in your TEMP directory can resolve MATLAB startup issues. To access your TEMP directory, open Windows Explorer and type the following in the address bar.
You can safely delete everything in this folder as these are just temporary files.
Problem #7: Username has a non-ASCII character
If your username has a non-ASCII character in it, MATLAB will not boot up properly. This usually manifests as a Java error. Try setting the MATLAB_PREFDIR environment variable to a location that does not use any non-ASCII characters. If this does not work, you will need to create another Windows username with ASCII characters to work around this issue.
My problem is not listed here
If you are still unable to start MATLAB after these troubleshooting steps, please contact MathWorks support:
Please include any log files, error messages, and screenshots pertaining to the problem with your help request.
Ntokozo Hlatshwayo
Ntokozo Hlatshwayo on 12 Sep 2022
Edited: Ntokozo Hlatshwayo on 12 Sep 2022
Action taken on solution 1 and im pleased to report that it worked, thank you!

Sign in to comment.

More Answers (27)

Paolo Martinelli
Paolo Martinelli on 7 Jan 2020
Problem #1: Corrupt preferences
Actions suggested worked fine for me. Thanks!

J Cherian
J Cherian on 31 May 2017
Edited: J Cherian on 31 May 2017
If all the solutions listed above does not help, it could also be due to a seemingly unrelated issue after all.
In my case, this MATLAB issue occured on my Windows 7 computer after I switched it from a local WORKGROUP to join a corporate domain network. When this MATLAB issue occurred, I also observed that I cannot access the Printers anymore.
Strangely, the solution to both problems was to go the Services management console (type 'services.msc' in the windows run window) to stop the Spooler service and make it "Manual" instead of "Automatic". I had also cleared the preferences by deleting the relevant sub-folder under %Appdata%\Mathworks as per procedure given above.

Sign in to comment.

Magnus Lundin
Magnus Lundin on 16 Nov 2018
Problem #1: Corrupt preferences
Actions suggested worked fine for me. Thanks!

Robert Spring
Robert Spring on 9 Mar 2021
Edited: MathWorks Support Team on 19 Apr 2021
I tried everything in https://www.mathworks.com/matlabcentral/answers/97167-why-will-matlab-not-start-up-properly-on-my-windows-based-system .Nothing worked. Then I installed the latest version of MATLAB. Still, MATLAB did not start. Then I un-installed all versions of MATLAB including removing preferences. When I re-installed MATLAB, it worked.

Davis Crowell
Davis Crowell on 13 Aug 2021
We had to rename both Matlab folders located under Roaming and Local to fix the issue.

Anvinder  Singh
Anvinder Singh on 18 Feb 2017
none of this works. I have matlab 2016a on windows 7 home premium and AMD A10-8700. I have reinstalled it 4 times.

Alessandro Maruccia
Alessandro Maruccia on 4 Dec 2018
Problem solved! Thanks a lot!

muhammad faiz
muhammad faiz on 23 Apr 2019
problem solved by updating back the java (problem no 4)
Thanks a lot!

TJ Houck
TJ Houck on 24 Apr 2019
Worked! I only had to do step 1. Thanks!
  1 Comment
Ang Feng
Ang Feng on 21 Sep 2020
Me too. I had reinstalled Matlab 2020a twice before fully get it working.

Sign in to comment.

PRACHI SHARMA on 5 Jun 2019
The solution given by Mathworks Support Team under the problem, Problem #1: Corrupt preferences, solved my problem of MATLAB 2019 window not maximizing.
Thanks a ton !

Marc Gauthier
Marc Gauthier on 6 Jul 2019
Two items to add to the official answer's troubleshooting list:

Jonas Berger
Jonas Berger on 7 Oct 2019
#Problem 4 gave me the answer that there is something wrong with my java version.
(flag -nojvm worked fined for me, the other flags caused a freeze after the first command)
I tried to set the environment variable MATLAB_JAVA to C:\Program Files\MATLAB\R2019b\sys\java\jre\win64\jre, updated java but this didn't solve my problem.
How can I proceed? (running Windows 10, 64bit, Matlab 2019b academic version)
Thank you
Jonas Berger
Jonas Berger on 12 Oct 2019
Hey Colin,
Thanks for your answer.
I found out that if I just wait for about 10 minutes of freezing, it starts working well.
That's alright for me.
-Jonas Berger

Sign in to comment.

erra lavanya
erra lavanya on 13 Nov 2019
It helped me.Thank you

Problem #1: Corrupt preferences
Recenty solved through this actions. When trying to start Matlab, it just showed the blue "Start" window, and then "seemed to be open" but it just showed the window on the taskbar of an "open program". Fortunately I´ve found this forum a few minutes later. R2017a on Windows 10 Home Single.

Nawfal Motii
Nawfal Motii on 28 Apr 2020
I faced the same problem....then I pin it in the taskbar and now is launching correctly

karinkan on 28 May 2020
Solved my problem at my first try! Thank you very much!

Martin Rhymes
Martin Rhymes on 17 Jun 2020
My issue was Problem #4: Issue with Java environment. I had recently install MATLAB R2020a on my Windows 10 x64 Enterprise machine. When I run the application, MATLAB loading screen appears and then closed. My cash dump file had the following. "C:\Program Files\MATLAB\R2020a\sys\java\jre\win64\jre\bin\JavaAccessBridge-64.dll+00064251". The JavaAccessBridge-64.dll in the installation was corrupted.
Solutions. Copy over and replaced the "JavaAccessBridge-64.dll" DLL with one from my Java installation "C:\Program Files\Java\jre1.8.0_251\bin\JavaAccessBridge-64.dll".
  • MathWorks's software engineers need to check their DLL in their installations

Fernando Fuentes Molina
Fernando Fuentes Molina on 20 Jun 2020
[Spanish]: Muchas gracias! Lo solucioné con la propuesta #4.
[English]: Thanks you so much! I solved my problem with the solution for Issue with Java environment

milad hasani
milad hasani on 21 Aug 2020
I suggest that install a last update on your installed matlab version:
For example 2018a:
I tried this and fixed it.

Felicity Ibukunoluwa Oguntolu
Solved my problem at the first try😭 thank you so much!

Yu Gong
Yu Gong on 10 Oct 2020
Great. Really thanks. I met the 1st problem.

domenico scarpelli
domenico scarpelli on 5 Dec 2020
Thanks mate, its work. Apriciate it.

joyel jose
joyel jose on 29 Jan 2021
my matlab was not working.when opening it was just blinking in task bar
Angelica Hernández Jaimes
Was someone able to repare this problem?
I'm in the same situation an any of the solutions given before worked for me.

Sign in to comment.

Clifford Lang
Clifford Lang on 24 Feb 2021
Wanted to confirm that renaming the preferences folder and deleting all temp files solved a 2020b startup problem we were having. Thanks!

Armelle Malcomb
Armelle Malcomb on 26 Jul 2021
Many thanks for identifying different problems preventing MATLAB from starting and providing solutions to fix each of them. The solution to fix problem #1 (Corrupt preferences) was very helpful in getting MATLAB working again on my PC. Best, A.
  1 Comment
saif rehman
saif rehman on 3 Jan 2023 at 13:43
Many Thanks
Solution #1 to fix problem
this solution is working

Sign in to comment.

Haiwei Shi
Haiwei Shi on 12 Sep 2021
I met the first issue, it opened successfully. But now it is runnig in extremly low speed. Taking an array of 1 to 6 takes me about 20 seconds. How can this issue be fixed?

Priyanka on 11 Jan 2023 at 10:30


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


No tags entered yet.


Community Treasure Hunt

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

Start Hunting!