[FIX] Matlab 2014a looks blurry on your Mac with Retina Display?

Matlab R2014a looks blurry on your Mac with Retina Display. This is because Matlab versions after 2013a use their own builtin Java instead the one that comes bundled with Apple’s OSX. Even though Mathworks is aware of that problem since 2013b they still did not fix it. Luckily there is an easy solution!


  1. Download  and install the new JAVA JRE: Java.com
  2. reboot (possibly you can skip this)
  3. Now download my starting app which starts Matlab with the new JAVA JRE
    Alternative: create an AppleScript with this code and save it as app. Note that all the code needs to be in one line.
  4. Use the app every time you want to start Matlab. You can simply drag it to your dock

 

FAQ

  • Mirror for the app download: Uploaded
  • the download is over 1mb because of the bundled Matlab Icon
  • You can check the Java version Matlab is using by typing the command: version -java
  • Note that the paths have to match in my example I used the default paths which are as following:

JAVA: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home\
MATLAB: /Applications/MATLAB_R2014a.app/bin/matlab

  • Inspiration for this post
  • Thanks to user feedback I realized that my wordpress theme destroys the code so I moved it to pastebin now
  • feel free to use my amazon affiliate link to express your feelings of eternal gratitude :)

31 thoughts on “[FIX] Matlab 2014a looks blurry on your Mac with Retina Display?

  1. If you add:
    cd ~/MATLAB;
    To the script, it will start nicely with the current working directory as ~/MATLAB instead of /

    Like

  2. Thank you for your input. Your command returns the following on my computer:

    floriko:~ floriko$ cd ~/MATLAB
    -bash: cd: /Users/floriko/MATLAB: No such file or directory

    Also make sure to delete the following from the script when you want to startup with a different directory:

    & “; export MATLAB_USE_USERWORK=1”

    Best,
    Florian

    Like

    • Ahhhh… so that’s what setenv MATLAB_USE_USERWORK 1 is for. I have some shell scripts which invoke matlab -nodisplay and it’s nice to have it start in the local directory, wherever that is… (i.e. I prefer a cd to userpath rather than export MATLAB_USE_USERWORK=1) Anyway, great script and it solved my problem! Running Matlab on the lower rez is borderline unbearable.

      (I forgot I had set my userpath to ~/MATLAB which is non-standard… my suggestion should have been cd ~/Documents/MATLAB I think?)

      Anyway, thanks!

      Like

      • Yes “~/Documents/MATLAB” is a standard setup. (By the way, changing directory is another nice idea.) And I also thank floriko for reflecting my comment on the script.

        Like

  3. Pingback: matlab 2014 with mac retina | msoede.dk

  4. MATLAB is not blurry using this script, but does not finish initializing. I am using version 8.3.0.532 (R2014a). Any suggestions?

    Like

  5. Hi Chuck,

    Sorry to hear you are experiencing trouble..Did you install the newest Java version first? Like explained in the instructions above..Just an idea.

    Best,
    Florian

    Like

    • Hi Florian,
      I recently have been able to start MATLAB after waiting several minutes for the software to initialize. I get the following Warning, but everything seems to work okay. Have you seen this before? Here is the Warning:

      Warning: Executing startup failed in matlabrc.
      This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon
      as possible. Error detected was:
      MATLAB:dir:pathnameTooLong
      Pathname
      ‘/System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/JavaPlugin2_NPAPI.plugin/Contents/Resources/English.lproj’
      is too long.

      In matlabrc at 192

      Thanks,
      Chuck

      Like

      • Hi Chuck,

        sorry I have never seen this error before. I would try reinstalling Java and Matlab, probably a clean reinstallation is a good idea.

        Maybe you are lucky and it is fixable by manually moving the files to a shorter directory…The error points that this incredibly long pathname is indeed too long.

        Best,
        Florian

        Like

  6. Florian,

    I’ve been using your script for a while but suddenly I have a couple of problems:
    – I cannot search on the documentation browser (the search field is not selectable)
    – I cannot modify the publish settings (I get about 15 lines of java errors and nothing else)

    I am on OS X 10.9.4 with Java 1.7.0_65-b17.

    Both problems happen every time I use your shortcut but never when I use the installation-provided .app file.

    Do you have any thoughts on what causes it and how to fix it?

    Thanks in advance,
    Chris

    Like

  7. Hi Chris,

    unfortunately not – especially without knowing the java errors you get. But from what you describe it sounds like an error caused by your java package maybe caused by a silent update?

    So I would try reinstalling/resetting Java and potentially downgrading to the last version, which was working for you. But that’s just a wild guess.

    Best,
    Florian

    Like

  8. This works even when using Yosemite PB. Just remember changing ProductVersion to 10.90 under /System/Library/CoreServices/SystemVersion.plist

    Like

  9. Hey, great script thank you! I’m still having a problem with changing the Matlab startup folder. As far as I can tell, the script I have does not contain & “; export MATLAB_USE_USERWORK=1″. Where can I add “~/Documents/MATLAB” in the script to make that my starting directory?

    Like

  10. Ok on example: i am in matlab, everything is fine. I type in the command window ‘help exit’. When i press ” Reference page for exit” i get error: Matlab has encountered an internal problem and needs to close.” It also asks to send feedback etc. Anyone else with the same problem?

    Like

    • I’ve having exactly the same problem with the Matlab help. As long as I use help only on the command window Matlab works normally, but it crashes always when launching the GUI-based help (doc).

      Like

Comment