George Tomlinson
George Tomlinson

Reputation: 1941

Javac not recognised

I tried typing the name of the bat file (makejar.bat) from the containing direcory from the command line. It gives several errors all containing "'javac' is not recognised as an internal or external command."

Upvotes: 0

Views: 408

Answers (3)

Sahil Infotech
Sahil Infotech

Reputation: 1

On CMD--> type--> PATH="c:\Program Files\Java\jdk1.8.0_144\bin"; and then check java path by type "java -version" on cmd and also check on YouTube : -https://www.youtube.com/watch?v=mzAAmJj-W6w

Upvotes: 0

Olimpiu POP
Olimpiu POP

Reputation: 5067

I suppose you are working on Windows, so make sure that your environment variables are properly set:

JAVA_HOME - points to a proper JDK installation
PATH - contains a references to JAVA_HOME, something like: **PATH;%JAVA_HOME%\bin**

This should do it! Make sure to restart the command line you are using after making changes to environment variables.

You can see how to set/add environment variables on windows here.

Upvotes: 1

Andre Lombaard
Andre Lombaard

Reputation: 7105

This sounds like a java class path problem.

You can find the instructions to set the java CLASSPATH on the following Oracle web page.

Upvotes: 1

Related Questions