Welcome to the Treehouse Community
Looking to learn something new?
javac is not recognized and git.exe can't start.
I have already installed java and android studio according to the video. I have 2 issues.
I tried running javac -version in the command prompt, I still get the same message as before installing java " 'javac' is not recognized as an internal or external command, operable program or batch file."
When I open android studio I get a pop up message "Can't start Git: git.exe. Probably the path to Git executable is not valid". Android studio seems to work just fine whenever I follow along the video. Should I fix this problem, and how to do it? Or is it not a necessity?
farazCourses Plus Student 21,474 Points
This is a common issue for beginners. Java requires some manual setup on Windows. You'll have to manually assign the PATH Environment variable, so you can use commands such as "javac" from the command prompt.
See this tutorial on how to set the PATH Environment Variable: http://stackoverflow.com/a/10046715
Michael Fraser11,229 Points
It sounds like the first problem is that even though you have installed java, your computer doesn't know where to find the java/javac executables. I recommend reading through this carefully to fix your command prompt issue: https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
For using git in Android studio, you need to have downloaded the git executable. Downloading the github desktop version for windows (assuming windows due to javac error you mentioned) will download git.exe and put it in an obscure folder that you can then point to in android studio. For example, my git.exe was found in: C:\Users\userName\AppData\Local\GitHub\PortableGit_[random letters and numbers]\bin. To point android studio to this folder, go to File -> Settings, open Version Control, click "Git" and click the "..." near the "Path to Git executable" input. Navigate to the git.exe in the folder mentioned previously and Android Studio should no longer give you that error.
If android studio is working then I guess fixing the javac issue is unimportant? The git issue only needs to be fixed if you are going to be using git-related VCS directly from Android Studio.
Hope this helps