How execute a jar generated with Compiler SDK from windows prompt.
이전 댓글 표시
I have generated a java library named example.jar.
I have already setted JAVA_HOME and CLASSPATH as follow:
JAVA_HOME:
CLASSPATH:

Path with jdk:
Java version from MAtlab command line:

My function takes 3 inputs (3 paths) and has no outputs.
Once the jar has been created I am trying to launch jar file from windows prompt with the following command:
java -cp MyJar.jar "C:\Program Files\MATLAB\R2021b\toolbox\javabuilder\jar\javabuilder.jar" 'path\file1' 'path\file2' 'path\file3'
And I'm receving the following error:
Error: impossible to find or upload the main class C:\Program Files\MATLAB\R2021b\toolbox\javabuilder\jar\javabuilder.jar
Caused by: java.lang.ClassNotFoundException: C:\Program Files\MATLAB\R2021b\toolbox\javabuilder\jar\javabuilder.jar
Any suggestion?
답변 (1개)
Sean de Wolski
2021년 11월 19일
0 개 추천
I'd strongly recommend that you create a "sample" with the Compiler SDK. Then the output will contain a getting started guide with the exact steps to run that sample and the sample will execute:
댓글 수: 4
Lorenzo Bernardi
2021년 11월 22일
Sean de Wolski
2021년 11월 22일
What does the packaging log say?
Lorenzo Bernardi
2021년 11월 22일
편집: Lorenzo Bernardi
2021년 11월 22일
Sean de Wolski
2021년 11월 22일
Do you have the Computer Vision toolbox on the trial license for compiler?
카테고리
도움말 센터 및 File Exchange에서 COM Component Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
