matlab java builder not working properly, i.e deploytool doesn't works properly, build fails

1 次查看(过去 30 天)
well i'm using matlab deploytool to convert my matlab code into java. em following this tutorial, but building fails. this is what i get..
mkdir 'C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\distrib' Warning: Directory already exists. mkdir 'C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src' Warning: Directory already exists. mcc -F C:\Users\Haseeb Qureshi\Documents\MATLAB\MLTest.prj MATLAB:I18n:InconsistentLocale - The system locale setting, English (United Kingdom)_United Kingdom.1252, is different from the user locale setting, English (United States)_United States.1252. mcc -W 'java:com.demo,Class1' -d 'C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src' -T 'link:lib' -v 'class{Class1:C:\Users\Haseeb Qureshi\Documents\MATLAB\makeSqr.m}' Compiler version: 4.11 (R2009b) Processing include files... 2 item(s) added. Processing directories installed with MCR... The file C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\mccExcludedFiles.log contains a list of functions excluded from the CTF archive. 2 item(s) added. Generating MATLAB path for the compiled application... Created 40 path items. Begin validation of MEX files: Wed Jul 02 20:49:18 2014 End validation of MEX files: Wed Jul 02 20:49:18 2014 Parsing file "C:\Users\Haseeb Qureshi\Documents\MATLAB\makeSqr.m" (Referenced from: "Compiler Command Line"). Parsing file "C:\Program Files (x86)\MATLAB\R2009b\toolbox\compiler\deploy\deployprint.m" (Referenced from: "Compiler Command Line"). Parsing file "C:\Program Files (x86)\MATLAB\R2009b\toolbox\compiler\deploy\printdlg.m" (Referenced from: "Compiler Command Line"). Deleting 0 temporary MEX authorization files. Generating file "C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\readme.txt". Executing command: "javac -verbose -classpath "C:\Program Files (x86)\MATLAB\R2009b\toolbox\javabuilder\jar\javabuilder.jar" -d "C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\classes" "C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\com\demo\Class1.java" "C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\com\demo\DemoMCRFactory.java" "C:\Users\Haseeb Qureshi\Documents\MATLAB\demo\src\com\demo\Class1Remote.java" "C:\Users\gHaseeb Qureshi\Documents\MATLAB\demo\src\com\demo\package-info.java""
'javac' is not recognized as an internal or external command, operable program or batch file. Error: An error occurred while shelling out to javac (error code = 1). Unable to build executable.
this is the error em also getting, plz @madhura suresh, do help me :) or someone else do help me, as its very important for me.. by executing this command:
version -java
Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot™ Client VM mixed mode
i've tried very hard to fing this compiler but couldn't find it, is there any other way to counter this problem? i.e i should be able to generate java code of my matlab algorithm.
i've followed this question and has tried the things mentioned in it, but now em not able to find this compiler of java so that i should install it. em using matlab r2009a.

采纳的回答

Tejas M U
Tejas M U 2014-7-3
编辑:Tejas M U 2014-7-3
Do you have the JDK installed on your machine? It is possible that you only have the JRE on your machine. Also add the path to JDK/bin and JDK to your Windows path, so that Builder JA can see the Java compiler (javac).
Have you set the JAVA_HOME and MATLAB_JAVA to point to the JDK accordig to teh builder JA doc?

更多回答(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