简体   繁体   中英

MATLAB code conversion to Java

I am trying to convert this code into Java Package using the MATLAB compiler and I'm getting this error on building. Can someone suggest anything?

'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.

Is there any specific command line to be included into the matlab function file (for example we include %#codegen for C/C++ conversion)

Make sure that you have the Java compiler installed. Try executing java -version and javac -version at a system prompt, and ensure that these both run and give a version that is supported by your version of MATLAB.

Check also that your system environment variables are set appropriately. In particular the JAVA_HOME variable should be set to your JDK path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM