Matlab Java Builder Error - javac

13 views (last 30 days)
Gkhn A
Gkhn A on 16 Sep 2015
Commented: Gkhn A on 16 Sep 2015
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""

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 16 Sep 2015
Edited: Titus Edelhofer on 16 Sep 2015
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 Comments
Titus Edelhofer
Titus Edelhofer on 16 Sep 2015
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 on 16 Sep 2015
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.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!