How do I change the Java Virtual Machine (JVM) that MATLAB is using for Linux?
272 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 20 de Mayo de 2014
Editada: MathWorks Support Team
el 28 de Mzo. de 2024
How do I change the Java Virtual Machine (JVM) that MATLAB is using for Linux?
Respuesta aceptada
MathWorks Support Team
el 28 de Mzo. de 2024
Editada: MathWorks Support Team
el 28 de Mzo. de 2024
By default, Linuxversions of MATLAB ship with the Oracle® version 8 Java Virtual Machine™ (JVM). However, you have the option to attempt to use other JVMs. MATLAB supports OpenJDK Java 8 for releases R2020a and later and since R2023a, MATLAB also supports OpenJDK Java 11. More details about what specific applications are supported for the most recent MATLAB release are listed on the following page:
MATLAB Interfaces to Other Languages
MATLAB is fully supported only for these specified versions of the JVM software. Some components may not work properly under a different version of the JVM software. For example, calling functions in a dynamically linked library that was created with a different JVM software version than that used by MATLAB might cause a segmentation violation error message.
If you choose to change the JVM software version used by MATLAB, follow the instructions below based on the release of MATLAB you are using.
Please follow the instructions from our jenv documentation page in the link below.
jenv
Note: MATLAB_JAVA takes higher precedence over jenv/matlab_jenv when both are set.On csh or tcsh shells, use the "setenv" command to set the MATLAB_JAVA environment variable. For example:
setenv MATLAB_JAVA <JRE path>
This command needs to be run in every new shell window.
On the bash shell, execute:
export MATLAB_JAVA=<JRE path>
This setting will apply to MATLAB launched from that shell window.
To verify that MATLAB is using the correct version of the JVM software, type the following at the MATLAB prompt:
>> version -java
If MATLAB is not using your value of MATLAB_JAVA, you may need to logout and log back in again.
Other Operating Systems/Platforms
To change the JVM MATLAB uses for other systems, use the following links.
Windows
macOS
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!