Strange activation issues with MATLAB

Alec Jacobson

December 18, 2015

weblog/

I recently tried to reinstall matlab. Downloading via the installer was taking forever and crashing halfway through so I tried zipping up the MATLAB_R2015b.app from a different machine and unzipping it into /Applications/. Upon launching matlab I got an error saying I needed to activate using the activation app.

First of all this app is a bit hidden. It's inside MATLAB_R2015b.app/ (treated as a directory).

Upon double-clicking on Activate.app, nothing.

Launching it via the command line:

./Activate.app/Contents/MacOS/Activate

I saw:

---------------------------------------------------------------------------
Error: Cannot locate Java Runtime Environment (JRE).
The directory /Applications/MATLAB_R2015b.app/Activate.app/Contents/sys/java/jre/maci64/jre does not exist.
---------------------------------------------------------------------------

I tried to fix this by copying the sys directory but then got

No configuration file found at /Applications/MATLAB_R2015b.app/Activate.app/Contents/java/config/activation/launcher.config

To fix both these problems I created MATLAB_R2015b.app/tmp then copied the activate program there and ran it:

mkdir tmp
cp ./Activate.app/Contents/MacOS/Activate tmp/
./tmp/Activate

That worked.