If after installing Matlab on Linux you are experiencing troubles like
Unable to initialize com.mathworks.mwswing.MJStartupFatal Error on startup: Failure loading desktop class
or
… Java is not currently available
Here is the way I resolved the issue on my Debian Lenny :
I installed the JDK from the Oracle’s download page (following the instructions). I chose the directory /usr/lib/jvm/ for the installation.
Then I created a symbolic link for Motif (as root) :
ln -s /usr/lib/jvm/jdk1.6.0_24/jre/lib/i386/motif21/ /usr/lib/jvm/jdk1.6.0_2/jre/lib/i386/motif12
And finally I set the environment variables :
export MATLAB_JAVA=/usr/lib/jvm/jdk1.6.0_24/jre/
export AWT_TOOLKIT=MToolkit
That’s all. Now I am able to launch Matlab :
<matlab_directory>/bin/matlab