You are not logged in.

#1 2016-02-21 23:37:17

c0rtex
Member
Registered: 2013-12-23
Posts: 13

Matlab Desktop Entry Java Version

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/jre

I don't quite understand what the desktop instance won't load it.

Offline

#2 2016-02-22 00:02:53

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Matlab Desktop Entry Java Version

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 -desktop

pkgs │ hacks │ cfg │ blag

Offline

Board footer

Powered by FluxBB