- 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?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 28 Nov 2022
Risposto: MathWorks Support Team
il 26 Gen 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.
Risposta accettata
MathWorks Support Team
il 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MATLAB Compiler SDK in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!