- 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?
7 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2022 年 11 月 28 日
回答済み: MathWorks Support Team
2023 年 1 月 26 日
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.
採用された回答
MathWorks Support Team
2022 年 11 月 28 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler SDK についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!