As of July 2024, ArtiSynth has been tested to run with MATLAB 2024a.
In order to interface ArtiSynth with MATLAB, the Java versions used by ArtiSynth and MATLAB must match. Since the Java versions available for MATLAB are limited, this also restricts which versions of the Java development kit (JDK) you can use to compile and run ArtiSynth.
MATLAB (through 2024) comes bundled with Java 8. To use ArtiSynth with this default MATLAB configuration, you must use ArtiSynth with JDK 8.
MATLAB 2023 (or later) can also be configured to run with JDK 11, and MATLAB 2024 can be configured to run with JDK 17. If you configure MATLAB to run with one of these JDKs (via the MATLAB jenv command), then you can also use that JDK for ArtiSynth.
In the following, assume that <ARTISYNTH_HOME> denotes the path to the ArtiSynth installation folder.
If you have not done so already, set the environment variable ARTISYNTH_HOME to <ARTISYNTH_HOME>. This can be done externally to MATLAB (see the Section Environment variables in the ArtiSynth Installation Guide for your system), or it can also be done within a MATLAB startup script using the setenv() command; see the MATLAB documentation regarding startup scripts.
Make sure that the folder <ARTISYNTH_HOME>/matlab is included in the search path for MATLAB functions; consult MATLAB documentation on how to do this.
Ensure that classes required by ArtiSynth are added to the MATLAB Java classpath, as described in Section 7.
If you have not done so already, add the ArtiSynth native library folder to the environment variable that specifies the dynamic library search path.
On Windows (64 bit), make sure <ARTISYNTH_HOME>\lib\Windows64 is included in the PATH environment variable.
On Linux (64 bit), make sure <ARTISYNTH_HOME>/lib/Linux64 is included in the LD_LIBRARY_PATH environment variable.
On MacOS, make sure <ARTISYNTH_HOME>/lib/MacOS64 is included in the DYLD_LIBRARY_PATH environment variable.
For more information on setting these variables, see the Section Environment variables in the ArtiSynth Installation Guide appropriate to your system.
Depending on how much memory your ArtiSynth application requires, you may need to adjust the MATLAB Java virtual memory limit (Section 6).
As necessary, add the classpath(s) for your ArtiSynth models to the MATLAB Java classpath, so that they will be visible to Java from within MATLAB. See Section 8 for details.