Sunday, March 24, 2019

Close ("kill") an open user session

It may frequently happen that a user's session, with a graphical desktop, may get stuck, for whatever unknown reason.
The system admin may then need to close ("kill" in Unix/Linux language).
Here you find a few suggestions on how to kill single processes running in that session, which may be responsible for freezing the graphical desktop, or how to kill the  user session itself.

Thursday, January 3, 2019

Use your Java classes in Matlab

If you have Java classes which you want to use in your Matlab functions/scripts, you need to add the folders or the Java class themselves where they are saved into Matlab's Java class path.

Matlab's Java classpath is a list of folders which is automatically created at Matlab startup.
This list typically contains only folders of predefined Java classes which comes with Matlab itself.

To include additional Java classes, you need to:

  1. create a text file called javaclasspath.txt;
  2. insert on a line of that file the full path of the folder containing the Java class file or the full path of the Java class filename itself;
  3.  save such text file in Matlab's preferences folder.
Whether you need to include in the javaclasspath.txt file the full path of the folder containing a Java class file or the full path of the filename itself depends upon the type of Java class file. For example, for a Java class archive file (.jar file), you need to provide the full path of the filename itself. For more info, see the Matlab's online Help page about the Java class path or search Matlab's online Help for "Java class path".

To know what's your Matlab's preferences folder, type the command prefdir at Matlab's command line.