[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!
- Download and install the new JAVA JRE: Java.com
- reboot (possibly you can skip this)
- 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. - 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 :)
If you add:
cd ~/MATLAB;
To the script, it will start nicely with the current working directory as ~/MATLAB instead of /
LikeLike
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
LikeLike
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!
LikeLike
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.
LikeLike
Pingback: matlab 2014 with mac retina | msoede.dk
where should I add the cd ~/Documents/MATLAB in the script?
thanks
LikeLike
Figure it out already, great script. lol
LikeLiked by 1 person
how did you do it ?
LikeLike
MATLAB is not blurry using this script, but does not finish initializing. I am using version 8.3.0.532 (R2014a). Any suggestions?
LikeLike
Perfect — works as expected!
LikeLike
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
LikeLike
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.
Thanks,
Chuck
LikeLike
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
LikeLike
WOOOOOOOOWWWWW BEESTTTTT SOLUTION…..FIRST TIME SOMETHING REALLY WORKS WITHOUT ANY AFFORD…. :D
LikeLiked by 1 person
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
LikeLike
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
LikeLike
This works even when using Yosemite PB. Just remember changing ProductVersion to 10.90 under /System/Library/CoreServices/SystemVersion.plist
LikeLike
it works! thanks bro
LikeLike
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?
LikeLike
the comments above from user mgunn might help you to figure it out. best, florian
LikeLike
Thank you so much!!!!!
LikeLike
Best and easiest solution so far. Thank you so much.
LikeLike
Thank you thank you thank you, worked a treat
LikeLike
Nice! Works like a charm!
LikeLike
Thanks
LikeLike
Thanks a lot!! You also fixed my problem with Yosemite… Wonderful!!!
LikeLike
Crashes every time i open reference page in help! What can i do to prevent that??
LikeLike
Please provide more detail about the crash – this way it is hard to help you.
LikeLike
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?
LikeLike
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).
LikeLike
Thanks, great geeking. Worked like a charm.
LikeLike