Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Nazifa Monjoor
Courses Plus Student 1,641 PointsIn cmd prompt ,"javac -version" not working properly even though i installed jdk.
.
2 Answers
Ken Alger
Treehouse TeacherNazifa;
Try java -version. That works for me in Windows CMD and Bash.
Ken
Gunjeet Hattar
14,483 PointsHi Nazifa,
Technically also a java compiler will have it's version, similar to the java interpreter. So what you tried was not incorrect. Did you try using only javac? If that's not working then you didn't set the environment variables properly.
The image is from a Mac OS, but then I've tested the same on Windows.
Hope this helps

Nazifa Monjoor
Courses Plus Student 1,641 PointsNazifa Monjoor
Courses Plus Student 1,641 PointsThnx a lot :)...it worked.