Which Java Virtual Machine is used by an application compiled using the MATLAB Compiler 4.3 (R14SP3)?
조회 수: 4 (최근 30일)
이전 댓글 표시
I would like to specify the JVM used by my MATLAB Compiled application.
채택된 답변
MathWorks Support Team
2009년 7월 2일
A MATLAB compiled application uses the MATLAB Compiler Runtime's (MCR) embedded Java VM (Virtual Machine) unless the MATLAB_JAVA environment variable points to another one.
Thus, following are the scenarios:
1) If MATLAB_JAVA environment variable is not set or is empty, the MCR's JVM is used.
2) If MATLAB_JAVA environment variable is set to point to the root directory of a particular JVM, the JVM being pointed to is used by MATLAB.
Also, here is a simple test to find out which JVM is used by a compiled application:
1) Create a MATLAB function that outputs the JAVA version:
function checkJavaVersion
version -java
2) Compile this application using the MCC command:
mcc -m checkJavaVersion
3) Run this application to check the version of JAVA that a compiled MATLAB application will use. From a shell or terminal:
checkJavaVersion
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!