How do I change the Java Virtual Machine (JVM) that MATLAB is using on Windows?
Accepted answer
MATLAB ships with one specific version of the JVM software on Windows depending on the release. MATLAB is fully supported only on these shipped versions of the JVM software. Some components might 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, you must:
Download and install the desired version of the JRE (Java Runtime Environment) or the JDK (Java Development Kit). The latter contains the JRE and development tools.
Determine the path of the JRE directory within that installation. This varies by platform and whether you downloaded the JRE or