How to set Temporary and Permanent Paths in Java?
In today's blog we will learn about How to set Temporary and Permanent Paths in Java ?. Lets go to learn....
https://todaygyan3.blogspot.com
When you go to run or execute the code of Java at the command
prompt and run or execute the program easily. But sometimes while
running an error appears and says that javac is not recognized as an
internal and external command operable program or batch file. Then
we have to set path of bin directory.
Here you can see in this photo what kind of error comes....
There are two ways of path setting--
- Temporary
- Permanent
1. Set a Temporary path on command prompt..
- Open command prompt.
- Copy the path of jdk/bin directory.
- Write in command prompt:Set Path=Paste the path.
Set Path=C:\Program Files\Java\jdk1.7.0_79\bin.
1. Set a Permanent path on command prompt..
- Write click on my computer .
- Then go to the properties.
- Then click on advance system setting.
- Then click on environment variables.
- Then click on new button of system variables.
- A new window will be appear on the screen
- Write path in the Variable name and paste your bin directory file in variable value. like as
- Then click on Ok button.
- Now run your file as follow...
I:\ javacoaching> javac Demo.java
I:\ jacacoaching> java Demo
Here your program will be executed.
Learn more:-
What is type casting
How many types of casting are there in Java?
What is the difference between explicit and implicit casting in Java?
What are implicit and explicit casting explain with the help of example Java?
How many types of casting are there in Java?
What is the difference between explicit and implicit casting in Java?
What are implicit and explicit casting explain with the help of example Java?
I hope you know How to set Temporary and Permanent Paths in Java ?. Must have understood very well. If you have any doubts in this blog, then you can write for it in the below comment box. There is one more request from you that you must tell your friends about this blog and share it on as many social media accounts as Facebook, What's app or others.
How to set Temporary and Permanent Paths in Java ?