-1

JAVAC Error

Please check the error. 'javac' is not recognized as an internal or external command, operable program or batch file.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Dell>echo %path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0\;C:\ant194\bin;C:\maven323\bin;C:\Java\jre67\bin;C:\Ruby200\b
in

C:\Users\Dell>java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)

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

C:\Users\Dell>

OS used is Windows 7 in Dell Vostro Laptop.

G.S
  • 10,413
  • 7
  • 36
  • 52

2 Answers2

2

From your path, you have the JRE (Java Runtime Environment) in the path but not the JDK (Java Development Kit), which is what gives you the compiler (javac) and other development-related tools.

If you have the JDK installed, you'll need to add it to your path ("jdk" will be in the name of the directory it's in, unless you do something completely custom). If you don't, you'll need to install it, and then ensure it's in the path.

A typical path for the bin directory of the JDK might be C:\Program Files\Java\jdk_x.x\bin, but if you've installed it to a custom location (as you have with the JRE), you'll just want to find the bin subdirectory of where you put it and put that in your path.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
1

JRE does not contain javac you need JDK

aviad
  • 8,229
  • 9
  • 50
  • 98