- Run "C:\Windows\System32\SystemPropertiesAdvanced.exe" and click the "Environment Variables..." button.
- Select the system variable "Path" and click "Edit...".
- If you do not have administrator rights on the machine, select the user variable "Path" instead of the system variable.
- Click "New" and add the folder <MATLAB_RUNTIME_INSTALL_DIR>\runtime\<arch>.
- For example, if you are using MATLAB Runtime R2022a located in the default installation folder on 64-bit Windows, add C:\Program Files\MATLAB\MATLAB Runtime\v912\runtime\win64.
- Click "OK" to apply the change.
- Make sure the first Runtime path that appears on the System Path list is the correct version
Why my C++ shared library DLL created using MATLAB Compiler crashes with a Fatal Java Exception?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 28 Nov 2022
Réponse apportée : MathWorks Support Team
le 26 Jan 2023
I have a C++ shared library DLL generated using MATLAB Compiler, and I am running code from C++ that is using this compiled shared library DLL. When I initialize my DLL I get the following MATLAB crash message:
Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at b:\matlab\src\jmi\javainit.cpp line 1356:
Fatal Java Exception. See Java Crash Report for details.
Réponse acceptée
MathWorks Support Team
le 28 Nov 2022
This issue can potentially be caused by the DLL not being able to locate the correct MATLAB Runtime Libraries.
Applications generated with MATLAB Compiler or MATLAB Compiler SDK use the system library Path to locate the MATLAB Runtime libraries. This issue can potentially be resolved by editing the System Path Environment Variable.
If you have multiple versions of MATLAB Runtime installed, make sure that the first MATLAB Runtime Path that appears on the System Path list is the correct version.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Compiler SDK dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!