An error occurred while shelling out to javac

1 次查看(过去 30 天)
I am trying to extract a jar file from matlab code using javac builder from Library Compiler(java package).
I have set as environment variable JAVA_HOME:
C:\Program Files\Java\jdk1.7.0_71
and in PATH variable:
C:\Program Files\Java\jdk1.7.0_71\bin.
When I am write in console java -version, I am getting java version jdk1.7.0_71 while when I am running javac -version I am getting jdk1.7.0_71.
However, it seems that matlab could not find javac variable, thus, I am not able to compile my .m code into .jar file. When I tried to compile .m code I got the following:
Error: An error occurred while shelling out to javac (error code = -1).
Unable to build executable.
Executing command: ""C:\Program Files\Java\jdk1.7.0_71\bin\javac"
This is the directory of my java bin folder and the file javac.exe exists : C:\Program Files\Java\jdk1.7.0_71\bin\javac? I found this link for compatibility of java compiler and Matlab2014a(which is my version) here What should I check in order to put correctly the link of Matlab and correct java version?

回答(2 个)

Snake
Snake 2015-1-19
Anyone?

Talha  Hasan Zia
Talha Hasan Zia 2016-8-25

类别

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