I installed jdk but I'm wont able to find it manually what should I do | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I installed jdk but I'm wont able to find it manually what should I do

I wrote the "HelloWorld.java" and then wanna compile it using the 'javac' but I have to install jdk I did it but Im not able to find it's directory manually cause I have to setup environment variable

13th Feb 2017, 11:34 AM
Singlelead
Singlelead - avatar
2 Answers
+ 2
hello single lead, To configure your environment variable Is pretty simple. Firstly lets Find the location / Directory where your Jdk was installed: Open and run command prompt(cmd) as an admin Then copy and paste this code : c:\> for %i in (java.exe) do @echo. %~$PATH:i Note : I'm assuming you are running on Windows. ----------------------------------------------------------------- To configure the Java HOME Environment variable Follow the steps below: Step 1- Locate the Java installation directory. Step 2- Click the Environment Variables button. Step 3- Under System Variables, click New. Step 4- In the Variable Name field, enter either: In the Variable Value field, enter your JDK or JRE installation path. Step 5- Click OK and Apply Changes as prompted. Voilà.. And its done.
14th Feb 2017, 3:46 PM
Kenny Dabiri
Kenny Dabiri - avatar
+ 1
Thanks Kenny Dabiri for your answer nice answer I did it and it worked ;)
14th Feb 2017, 4:33 PM
Singlelead
Singlelead - avatar