+ 4
What do i do if "javac" isn't recognized by cmd?
15 Answers
+ 5
add the path to your environment variables
+ 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
+ 3
try on netbeans
+ 1
thank you
+ 1
Try to add \bin at the end of your PATH at variables
+ 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.
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
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
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.
0
add the path of java which probably in c:/ programfiles / java / bin to your system variables
0
java
0
go for the bin file
0
set path and classpath
- 1
always "javac" is recognized by cmd
- 2
use achieve.jar