Wednesday 25 December 2019

java - Error : 'javac' is not recognized as an internal or external command,


java program is not running on my windows 10 pc.


C:\Users\Antony>set path=C:\Program Files (x86)\Java\jre1.8.0_171\bin

C:\Users\Antony>cd Desktop

C:\Users\Antony\Desktop>javac helloworld.java
'javac' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Antony\Desktop>

environment path =C:\Program Files (x86)\Java\jre1.8.0_171\bin

C:\Users\


java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) Client VM (build 25.171-b11, mixed mode, sharing)

still showing same error



Answer



The Java Compiler (javac) is installed with the Java Development Kit (jdk), not the Java Runtime Environment (jre)


If you have not already done so, go to the Oracle website and look for the JDK version that you need.


After installing it, set the path to the following:


set path=C:\Program Files (x86)\Java\jdk1.8.0_171\bin

(assuming you're going to install the equivalent architecture/version of jdk that you installed of jre above)


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...