An error occurred while shelling out to javac

4 vues (au cours des 30 derniers jours)
Snake
Snake le 9 Jan 2015
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?

Réponses (2)

Snake
Snake le 19 Jan 2015
Anyone?

Talha  Hasan Zia
Talha Hasan Zia le 25 Août 2016

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by