+ 4

What do i do if "javac" isn't recognized by cmd?

22nd Dec 2016, 8:15 PM
Sonny Fragoso
Sonny Fragoso - avatar
15 Answers
+ 5
add the path to your environment variables
22nd Dec 2016, 8:25 PM
kallzo
kallzo - avatar
+ 3
(expanding on kallzo's answer) How to add the path: set path=%path%;C:\(path to your compiler)\bin Type that in cmd(all one line.) It helps if you save your stuff in one folder in C: drive, for example C:\mywork. Then type in cmd: cd C:\mywork (or whatever your folder is) then type: javac *.java to compile all .java files in folder. then type: java fileyouwanttorun.java To automate this, make a .bat file (run.bat for example) and put this in the .bat file and save in your folder: @echo off cd C:\mywork (or whatever your folder is) set path=%path%;C:\(path to compiler)\bin javac *.java then just run the .bat every time. When it runs, just type: java yourfile.java to run the source file you want to test
9th Jan 2017, 1:17 PM
neon_cabbage
neon_cabbage - avatar
+ 3
try on netbeans
11th Jan 2017, 5:29 PM
Shabbir Sakarwala
Shabbir Sakarwala - avatar
+ 1
thank you
9th Jan 2017, 9:22 PM
Sonny Fragoso
Sonny Fragoso - avatar
+ 1
Try to add \bin at the end of your PATH at variables
15th Jan 2017, 7:51 AM
Павел Паначевный
Павел Паначевный - avatar
+ 1
Maybe java is not installed properly. If it is installed simply set path . To set path go to folder where java has been installed. select jdk folder and then go to bin , after this click on address bar and copy whole address l. After copying the address right click on my computer icon and select properties go to advance setting there select environmental variable scroll down and click on path and click on edit then put semicolon(;) after default address and copy your address and press OK. Now your path is set to check that simply go on cmd and type path and hit enter path will be displayed.
15th Feb 2017, 6:54 AM
Shikhar Awasthi
0
following are easy steps to follow for proper installing JdK download JdK from Oracle set the path properly in environmental variables to check whether Java is configured or not type Java in cmd
11th Jan 2017, 5:52 PM
Kallanagouda Biradar
0
okay it is very important to set path in new variable after set the path you will get the result of javac in cmd thank u
11th Jan 2017, 6:53 PM
Vishvapalsinh Paramar
Vishvapalsinh Paramar - avatar
0
I had also this problem so first of all check whether you have set the environment variable path or not , if yes and you are still facing the problem then you must have installed different version of JDK i.e download the same version as of your PC OS version (32 bit/64 bit). Check whether this helps or not.
12th Jan 2017, 3:57 PM
Keshav Narayan
Keshav Narayan - avatar
0
add the path of java which probably in c:/ programfiles / java / bin to your system variables
12th Jan 2017, 7:39 PM
aqib javed
0
java
13th Jan 2017, 1:36 AM
DL Batuhan
DL Batuhan - avatar
0
go for the bin file
13th Jan 2017, 8:41 AM
Onepage stories
Onepage stories - avatar
0
set path and classpath
18th Jan 2017, 10:26 AM
Keerthi Reddy Yeruva
Keerthi Reddy Yeruva - avatar
- 1
always "javac" is recognized by cmd
10th Jan 2017, 7:02 AM
aganepes
- 2
use achieve.jar
11th Jan 2017, 4:28 AM
sudha