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

I need to convert my Matlab algorithm to Java. To do this, I use the toolbar java toolbar, after completing all the necessary steps, the assembly fails and this error is displayed:

'javac' is not recognized as an internal or external command, operating program, or batch file. Error: An error occurred during shelling in javac (error code = 1). Failed to create executable file.

When you type java -versionmatlab at the command prompt, this is what I get:

Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot (TM) Client Mixed Mode VM

This means that I have to have this java compiler installed on my computer, only then the matlab java developer works. I'm new to Java, I'm not sure which compiler I should look for.

+4
source share
8 answers

If you want javac(compiler), you will need to download the Java Development Kit (JDK), not just the Java Runtime Environment (JRE). Please note that JDK includes JRE.

This tutorial gives instructions for installing JDK on your computer.

+5
source
  • , jdk jre, java. C:\Program Files\Java.

  • p > a > "",

  • , Java, C:\ProgramData\Oracle\Java\javapath, C:\Program Files\Java\jdk1.x.x_x\bin.

, .

+5

, :

1) Java\jdk\bin, C:. :

C:\Program Files (x86)\Java\jdk1.8.0_65\bin

2) → → → → .. → ..

3)

 Set Variable name: PATH
 Variable value: C:\Program Files (x86)\Java\jdk1.8.0_65\bin

4) OK, cmd .

, !

+3

. Ex, C://aklsej; dlfkj/blahblah

, , , , , , java to.

, javac , .

+1

, Windows (javac).

Windows, javac. , JDK C:\jdk1.8.0. Enter:

C:\jdk1.8.0\bin\javac HelloWorld.java , javac java- C:\jdk1.8.0\bin\ , . , " Hello World" -

, HelloWorld, ,

, .java . , javac HelloWorld.java javac HelloWorld.

0

JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09
set PATH=%JAVA_HOME%\bin
0

Java .

http://www.oracle.com/technetwork/java/javase/downloads/index.html

: 1: MyComputer .

2: ""

3:

4: JAVA_HOME

5: JAVA_HOME jdk bin, c:\Programfiles\Java\jdk-1.6\bin

, u .; , , .

6: " ", : c:\Programfiles\Java\jdk-1.6\bin .

7: Java. ,

Java
who will receive the help list doc

To make sure the compiler is configured Type in cmd

Javac

which will get a list related to javac

Hope this helps!

0
source

Source: https://habr.com/ru/post/1547004/


All Articles