javac isn't recognised but java is | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

javac isn't recognised but java is

I added the bin folder's location to my PATH, closed cmd and opened it again, ensured the path I gave was right, then entered 'javac' (without the quotes) and was told it wasn't recognised as an internal or external command, operable program or batch file. However, when I enter 'java' I'm greeted with a list of commands. Also if I try to do 'javac ExampleProgram.java' in the right directory I get the javac error but when I replace javac with java I get told main class ExampleProgram.java could not be found or located. Any help?

8th Aug 2016, 6:06 PM
RonBar-Ad
2 Answers
0
u probably might have messed up something so restart ur process freshly
8th Aug 2016, 6:33 PM
Suhail Pappu
Suhail Pappu - avatar
0
I had the same problem u need to add the bin folder location under the environment variable path only separate the existing(if it exists) location in path environment variable with a semi colon. u are probably saving it under java_home
6th Oct 2016, 9:26 PM
harsh
harsh - avatar