MATLAB: What is the correct value for LD_LIBRARY_PATH on 64-bit Linux when using MATLAB Compiler 4.4 (R2006a)

6464-bit64bitlinuxMATLAB Compiler

The MATLAB Compiler documentation lists the following to set my LD_LIBRARY _PATH variable.
setenv LD_LIBRARY_PATH
$MATLABROOT/sys/os/glnxa64:
$MATLABROOT/bin/glnxa64:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/native_threads:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/client:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64:
$MATLABROOT is the MATLAB root directory on your machine, as returned by typing:
matlabroot
at the MATLAB command prompt.
However, there is no folder named:
$MATLABROOT/sys/java/jre/glnxa64/jre1.4.2/lib/amd64/client:
When I executed my application with the LD_LIBRARY_PATH variable set to the above value, I receive the following error message.
Warning: Unable to load Java Runtime Environment: libjvm.so: cannot open shared object file: No such file or directory.
Warning: Disabling Java support
Hello, World
Severe:
javainit.cpp:216: Assert : JNI_OK == jvmLoadResult, ""
The program '[12467] : Native' has exited with code 2 (0x2).
Abort

Best Answer

There is an error in the documentation for MATLAB Compiler 4.4 (R2006a) with regards to the value of the LD_LIBRARY_PATH environment variable on 64-bit Linux platforms.
On a development machine, the documentation should read:
setenv LD_LIBRARY_PATH
$MATLABROOT/sys/os/glnxa64:
$MATLABROOT/bin/glnxa64:
$MATLABROOT/extern/lib/glnxa64:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib/amd64
setenv XAPPLRESDIR $MATLABROOT/X11/app-defaults
For a deployment machine, the documentation should read:
setenv LD_LIBRARY_PATH
$MCR_ROOT/$VER/runtime/glnxa64:
$MCR_ROOT/$VER/sys/os/glnxa64:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:
$MCR_ROOT/$VER/sys/java/jre/glnxa64/jre1.5.0/lib/amd64:
setenv XAPPLRESDIR $MCR_ROOT/$VER/X11/app-defaults
In the preceding example, $MATLABROOT and $MCR_ROOT represent the root directories of the MATLAB ($MATLABROOT) and MATLAB Compiler Runtime (MCR) installation ($MCR_ROOT) respectively. $VER refers to the version of MCR installed (for example, v73 or v74).