Is it possible to add custom Java classes using JAVAADDPATH to the Java class path in a deployed application using MATLAB Compiler 4.18.1 (R2013a)?
조회 수: 8 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2013년 10월 25일
답변: MathWorks Support Team
2013년 10월 25일
We use MATLAB Compiler to deploy our products, and would like to ship additional Java libraries. Can this be done by adding JAVAADDPATH to the code of the application we wish to compile? Will a call to JAVAADDPATH need to be surrounded with the ISDEPLOYED function?
채택된 답변
MathWorks Support Team
2015년 2월 27일
Adding JAVAADDPATH to a function to add classes or JAR-files to the Java class path and then compiling that function will allow the compiled executable to run as long as the location of the classes/JAR-files is the same as that declared in the executable. Using JAVAADDPATH will not add the classes/JAR-files to the compiled application.
If the location of the JAR-file/classes on the target machine is different to the location on the development machine, you may wish to include an ISDEPLOYED method to differentiate between the two. Alternatively, to retain a degree of flexibility, you may wish to pass the actual path as an argument to the function rather than hard-coding it in the function.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB Compiler SDK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!