Matlab Java Builder Error - javac

조회 수: 4 (최근 30일)
Gkhn A
Gkhn A 2015년 9월 16일
댓글: Gkhn A 2015년 9월 16일
When i am trying to build a jar from matlab, There is an error about javac but i set PATH and JAVA_HOME veriables. How can i fixed ?
ant:
<mkdir dir="C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\distrib" />
<mkdir dir="C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src" />
mcc -W 'java:facerecognition,FaceRecognition' -T link:lib -d C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v 'class{FaceRecognition:C:\Users\G-khn\Desktop\facee\Face-Recognition-master\CreateDatabase.m,C:\Users\G-khn\Desktop\facee\Face-Recognition-master\EigenfaceCore.m}'
Compiler version: 4.18.1 (R2013a)
Processing C:\Program Files\MATLAB\R2013a\toolbox\matlab\mcc.enc
Processing C:\Program Files\MATLAB\R2013a\toolbox\images\mcc.enc
Processing C:\Program Files\MATLAB\R2013a\toolbox\shared\spcuilib\mcc.enc
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
0 item(s) added.
Generating MATLAB path for the compiled application...
Created 47 path items.
Warning: Adding path "C:\Users\G-khn\Desktop\facee\Face-Recognition-master" to
Compiler path instance.
Warning: Adding path "C:\Users\G-khn\Desktop\facee\Face-Recognition-master" to
Compiler path instance.
Warning: Duplicate directory name:
C:\Users\G-khn\Desktop\facee\Face-Recognition-master
Parsing file "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\CreateDatabase.m"
    (Referenced from: "Compiler Command Line").
Parsing file "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\EigenfaceCore.m"
    (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2013a\toolbox\compiler\deploy\deployprint.m"
    (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2013a\toolbox\compiler\deploy\printdlg.m"
    (Referenced from: "Compiler Command Line").
Deleting 1 temporary MEX authorization files.
Removing: 'C:\Users\G-khn\AppData\Local\Temp\mathworks_tmp_7068_11007_7068.auth'.
Generating file "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\readme.txt".
The system can not find the path specified.
Error: An error occurred while shelling out to javac (error code = 1).
Unable to build executable.
Executing command: ""C:\Program Files\Java\jdk1.8.0_60\bin\bin\javac" -verbose -classpath "C:\Program Files\MATLAB\R2013a\toolbox\javabuilder\jar\javabuilder.jar" -d "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\classes" "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\facerecognition\FaceRecognition.java" "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\facerecognition\FacerecognitionMCRFactory.java" "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\facerecognition\FaceRecognitionRemote.java" "C:\Users\G-khn\Desktop\facee\Face-Recognition-master\facerecognition\src\facerecognition\package-info.java""

채택된 답변

Titus Edelhofer
Titus Edelhofer 2015년 9월 16일
편집: Titus Edelhofer 2015년 9월 16일
Hi,
the builder tries to execute the following call:
"C:\Program Files\Java\jdk1.8.0_60\bin\bin\javac" ...
I guess you set your JAVA_HOME variable to
C:\Program Files\Java\jdk1.8.0_60\bin
Remove the "bin" at the end. JAVA_HOME should point to the root of the jdk, not to the bin folder.
Second: you installed JDK 1.8. To work with Builder JA in R2013a you will need to install JDK 1.6, see here.
Titus
  댓글 수: 3
Titus Edelhofer
Titus Edelhofer 2015년 9월 16일
Hi,
I'm sorry, but I don't have a solution for this one. The code is compiled, it's the automatic documentation step that fails. The only observation I have is that the jdk 1.6.0_01 is a really old one. Maybe a newer one (jdk1.6.0_70 or similar) helps?
Titus
Gkhn A
Gkhn A 2015년 9월 16일
haha, this is some bug, i think. Thank you for your help. It is about language of windows. For fix It should be engilish. just that.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Java Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by