2 Way To Set Java Path In System Step By Step Guide.. - FindersAdda : Tutorials of Make Money, Computer or Internet

Monday, 20 November 2017

2 Way To Set Java Path In System Step By Step Guide..


Today, I will tell you that how to set path for java in command prompt and other place. So, you must read this post for deep knowledge.


What Is Path?





Path is a way for go to destination folder or location to source folder or location. Here, we set path for run or execute java program by command prompt. As we know that java is an object oriented programming language which is simple programming language.


We can't execute any program of any programming language in command prompt without setting his path. So, you must know to set path of any programming language if you are a student in computer field. 

In this article, I will tell you only set path of java. If you will be executed java program from C drive where java program installed then java program don't be executed from where java program installed.

That's why, we have to set path for run or execute java program in my computer system. Here, I will tell you two methods to set path for execute java program.



First Way to set Path For Execute Java Program


Step 1. Fist of all, you have to install java software to run java program. 

Step 2. Now, you have to write any program and save this program in any storage drive.

Step 3. Now, you have to open command prompt. To open command prompt Press Windows button + R button and type cmd in box and then press enter



type cmd in run box



Step 4. Then, Open your location in command prompt where your program is saved. For example your program is saved on D: Drive then you write D: (D and then colon sign) and then press enter

Step 5. If you have saved program in any folder within D: drive then you will be gone to destination folder by writing Cd Folder name/Foldername and then press enter like below image



go to location where program is saved



Step 6. Open file explorer by double clicking on "My Computer" icon which is available on desktop.

Step 7. Then, open bin folder from where your java program is installed.

Step 8. Then, copy the address from address bar



copy bin folder address



Step 9. Now in command prompt, write "set path=C:\Program Files (x86)\Java\jdk1.6.0_23\bin" and then press enter. Here, you will be written your own location of java bin folder.



set path in command prompt



Step 10. You can check that your path is perfectly set or not by typing javac in command prompt.



write javac to check it is correct or not




If we follow the first way to set path to execute java progam then you have to set path always to run java program when you open command prompt. So, if you want to set java path forever then you should follow second way to set path.





Second Way To Set Path To Execute Java Program



Step 1. First of all, install java program in your computer. If it already installed in your computer then follow next step.

Step 2. Then, open bin folder from installed location of java

Step 3. Copy the full address from address bar



copy bin folder address



Step 4. Now, minimize all open tab and right click on the My computer or This PC icon and then click on the Properties option.




click on the properties



Step 5. Now, click on the "Advanced System Setting" option which is available on the left side.



click on the advanced system setting



Step 6. Now, Click on the Environment Variables.. 



click on the Environment Variables



Step 7. Now, click on the New.. Option 



new-option



Step 8. Now, write path in variable name box and paste the copied address in variable value box



set path in variable box



Step 9. Then click on the Ok 

Step 10. Again click on the Ok

Step 11. Now, click on the Apply and then Ok

Step 12. Now, open command prompt by pressing Windows button + R and write javac to check your path is correctly set or not.



type javac to check program is run or not




Final Words

I hope you liked this post so much. If you loved this post, so, share with your friends and also give some suggestion that what should i improve in this post. Thank You So Much...... 

 

About Author

SUMIT KUMAR GUPTA
SUMIT KUMAR GUPTA

Author & Editor

Myself Sumit Kumar Gupta & 21 year's old person. I am a programmer and blogger. I spend much more time on programming and blogging and helps other programmers and bloggers.