You are not logged in.
This should be a very straightforward and simple thing. However I just don't get what the hell is going on.
I have a desktop entry for matlab in /usr/share/applications/matlab.desktop.
I need to set the Java version but running the desktop shortcut uses prepackaged java version that comes with Matlab. However if I run from terminal, the correct Java version is loaded.
The entry the are same as the Arch wiki:
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/matlab.png
Name=MATLAB
Comment=Start MATLAB - The Language of Technical Computing
Exec=matlab -desktop
Categories=Development;
MimeType=text/x-matlab;Added this to my .bashrc
export MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk/jreI don't quite understand what the desktop instance won't load it.
Offline
Since you haven't stated what your WM/DE is nor how you start it, I'm going to assume that the entry in your .bashrc will not affect the WM/DE. The most sane guess I can make is to modify `Exec` entry:
Exec=env MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk/jre matlab -desktopOffline