フィルターのクリア

How to include '-nojvm' into compiler command line in Matlab?

6 ビュー (過去 30 日間)
Cem
Cem 2015 年 3 月 31 日
コメント済み: JClarcq 2024 年 3 月 25 日
One way to speed up initial loading of MCR to the memory by 20-30% for a C++ compiled library is to avoid loading java component by using '-nojvc' switch in the command line of mcc http://www.mathworks.com/matlabcentral/answers/100607-why-does-my-application-compiled-with-the-matlab-compiler-4-1-r14sp1-take-a-long-time-to-start-up :
mcc -m -R -nojvm test.m
I could not find a way to include this switch in the DeployTool (anybody knows how to insert switches in this tool?). DeployTool shows the compilation command string in its GUI as:
mcc -W cpplib:DLLfile -T link:lib -d C:\DLLFile\src -N -p images -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v C:\DLLFile\DLLFile.m
So I thought I can use this command string and include '-nojvm' to compile it in Matlab command view instead. But wherever I place this switch in this command line I get "Unrecognized option: -n" message. Is there a location where I can safely use it so that I can compile it without the Java library? Thank you.

回答 (1 件)

Vinod Sudheesh
Vinod Sudheesh 2015 年 4 月 1 日
While using "deploytool", you can pass additional parameters to "mcc" command by first going to "Settings" (in "deploytool" window) and then setting the same in the "Additional Parameters passed to MCC:" box.
  3 件のコメント
JClarcq
JClarcq 2024 年 3 月 25 日
mcc -nojvm -o MyAppIsBeautiful MyApp.m
mcc will complain that there are several "o" attributes! Obviously "-nojvm" is not recognized. Same trough the settings of teh DeployTool.
How can we specify an app (appdesigned) to not start MCR with JVM?
JClarcq
JClarcq 2024 年 3 月 25 日
I found the answer thanks to Matlab's ChatGPT. I need to type
-R "-nojvm"
in the settings of the deploytool.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by