+ 3

Why can't I open javac on my CMD?

I have already set my PATH variable on the User variables and set the value to C:\Program Files\Java\jdk1.8.0_101. I restarted the CMD and tried running javac but it just says it is not recognized. I tried re-setting the variable and instead of writing the value i browsed it to be certain i made no typos, restarted cmd and still nothing. I even restarted my laptop but I just can't get it to work. Please help

20th Aug 2016, 3:31 AM
Tomas Payan
Tomas Payan - avatar
6 Antworten
+ 5
nevermind finally found what went wrong. In the Value of the PATH variable there is something missing. it should read C:\Program Files\Java\jdk.1.8.0_101\bin. That bin was the reason it didn't work. Hope this helps someone with the same problem.
20th Aug 2016, 3:43 AM
Tomas Payan
Tomas Payan - avatar
+ 1
yes, we have to select the path first but you can also set it permanently by following steps 1.Open "this pc" properties . 2.click on advanced settings. 3.click on environmental variables. 4.click on edit. 5.copy the path of bin from installation folder. 6.past it after the existing paths 7.use " ; " to separate paths. note- do not edit any existing paths.
21st Aug 2016, 4:38 AM
dhairyashil patil
dhairyashil patil - avatar
+ 1
I did everything right but the javac command opens and closes immediately by itself... please what could be causing that. Thanks
25th Jan 2017, 3:13 PM
Saint Ademola
Saint Ademola - avatar
0
see the true path
20th Aug 2016, 11:27 PM
Alessandro Scaramella
0
thanks. useful!
8th Jan 2017, 8:21 AM
Ets
Ets - avatar