How do I reinstall or uninstall MATLAB R2012a that has fatal error problem?

1 view (last 30 days)
I have 64-bit Windows 10.0 operating system. I have been using MATLAB R2012a [on other drive rather C:\ drive] since 2013. Suddenly my MATLAB R2012a has been showing fatal error: cannot locate com/mathworks/jmi/OpaqueJavaInterface class. I have even updated JAVA (8.0.1110.14) according to my 64-bit Windows OS. I have set JVM by following How do I change the Java Virtual Machine (JVM) that MATLAB is using on Windows? I cannot even uninstall MATLAB, it says installer error: exception calling main.
Now I don't know how to solve such problem. Please provide me with effective suggestions. Thanks.

Answers (1)

Naga
Naga on 12 Mar 2025
The errors you've encountered—"cannot locate com/mathworks/jmi/OpaqueJavaInterface class" and "installer error: exception calling main"—are indicative of underlying problems that can arise due to various reasons. Here are some steps to help you address these issues:
Addressing the 'Cannot locate com/mathworks/jmi/OpaqueJavaInterface class' Error:
This particular error often indicates a problem with MATLAB's Java Virtual Machine (JVM) configuration or a corrupted installation. To resolve this:
  • If you've previously set the 'MATLAB_JAVA' environment variable to specify a custom JVM, it might be causing conflicts. Ensure that this variable is either unset or points to a compatible Java version. For guidance on setting or unsetting this variable, refer to:
  • A 'java.opts' file in MATLAB's path can influence JVM settings and potentially cause startup issues. Search your MATLAB directories for this file and temporarily remove or rename it to see if it resolves the problem.
  • If the above steps don't help, your MATLAB installation might be corrupted. Consider uninstalling and then reinstalling MATLAB. Since you're encountering uninstallation issues, proceed to the next section for guidance.
Handling the 'Installer error: exception calling main' During Uninstallation:
This error can occur due to several reasons, including:
  • Corrupted Installation Files, ensure that your installation files are complete and not corrupted. If in doubt, re-download the installer from MathWorks.
  • Non-standard characters in your system's TEMP, TMP environment variables, or even in your username can cause this error. Verify that these variables and your username contain only standard ASCII characters.
  • Installing MATLAB in a directory that already contains a different MATLAB version can lead to conflicts. Ensure that each MATLAB version is installed in its own unique directory.
For a detailed explanation and additional troubleshooting steps, refer tothe below links:

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!