'javac' is not recognized as an internal or external command

前端 未结 8 643
独厮守ぢ
独厮守ぢ 2021-01-13 10:25

I have to convert my Matlab algorithm in Java. For this I\'m using matlab builder ja toolbox, after following all the necessary steps, the build fails and this error is disp

8条回答
  •  余生分开走
    2021-01-13 10:37

    If you receive this error, Windows cannot find the compiler (javac).

    Here's one way to tell Windows where to find javac. Suppose you installed the JDK in C:\jdk1.8.0. At the prompt you would type the following command and press Enter:

    C:\jdk1.8.0\bin\javac HelloWorld.java If you choose this option, you'll have to precede your javac and java commands with C:\jdk1.8.0\bin\ each time you compile or run a program. To avoid this extra typing, consult the lecture "Creating a Hello World application" in this website

    Class names, 'HelloWorld', are only accepted if annotation processing is explicitly requested

    If you receive this error, you forgot to include the .java suffix when compiling the program. Remember, the command is javac HelloWorld.java not javac HelloWorld.

提交回复
热议问题