+ 4

How do I setup JDK?

I installed jdk-13.0.1, but I did not get it's commands globally available on command prompt, so how to set those globally available on command prompt? Using Windows 10.

3rd Jan 2020, 6:47 PM
Seb TheS
Seb TheS - avatar
5 Réponses
+ 14
Seb TheS this two links might helpful for you Confirm the existance and name of your jdk directory and don't add the final backslash after bin to the path. java command should works fine because the java runtime edition (jre) will already be in your path whereas javac is only in the jdk. To check if your using the correct directory open a command prompt and type.. "C:\Program Files\Java\jdk{version}\bin\javac" -version Note that the quotation marks are required because the path has spaces in it. and other information are mentioned in below links https://stackoverflow.com/questions/7709041/javac-is-not-recognized-as-an-internal-or-external-command-operable-program-or Set the path variable in your environment: https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
3rd Jan 2020, 9:11 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 7
In order to utilise Java commands within the command prompt on the Windows 10 Operating System you would have to first navigate to System properties, then environment variables. Under System variables click new and add a variable name "JAVA_HOME". For the variable value add the path for the JDK folder that is under the program files folder within the C: drive, such as C:\Program Files\Java\jdk{JDK version}. Press Ok twice and you should be able to utilise Java commands within the Command prompt. I normally set it similar to this when setting my computer for the first time. Hope this helps!
3rd Jan 2020, 6:54 PM
Justin Joseph
Justin Joseph - avatar
+ 2
Seb TheS if it does not function attempt on adding it to the the path variable in system variables by selecting edit on the path variable and adding JDK folder path when selecting new.
3rd Jan 2020, 9:05 PM
Justin Joseph
Justin Joseph - avatar
+ 2
GAWEN STEASY Justin Joseph I got the problem solved, the link helped. Thanks!
3rd Jan 2020, 9:25 PM
Seb TheS
Seb TheS - avatar
+ 1
Justin Joseph I did what was told, but Command prompt doesn't detect javac as a command.
3rd Jan 2020, 9:02 PM
Seb TheS
Seb TheS - avatar