The path is required to be set for using tools such as javac, java etc. If you are saving the java source file inside the jdk/bin directory, path is not required to be set because all the tools will be available in the current directory.
But If you are having your java file outside the jdk/bin folder, it is necessary to set path of JDK.
There are 2 ways to set java path:
1) How to set Temporary Path of JDK in Windows
To set the temporary path of JDK, you need to follow following steps:
- First you create your folder in any drive.
- Open notepad editor.
- Write following path.
4. Then save this file with .bat extension in your folder.
5. Now open command prompt and execute the bat file.
2) How to set Permanent Path of JDK in Windows
For setting the permanent path of JDK, you need to follow these steps:
• Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok
1)Go to MyComputer properties.
2.click on advance tab.
3.click on environment variables.
4.click on new tab of user variable.
5.write path in variable name.
6. Copy the path of bin folder.
8.click on ok button.
9.click on ok button.
Now path is set permanent.Now you can execute any java program from any drive.
Array in Java
Java Array In Java Programming,it becomes necessary to store data within the memory in the most ...read more
Call by Value and call by Reference.
What is Call by Value and Call by Reference in Java Call by value and call ...read more
Operators in Java
Operators In Java Operators are symbols that are used to perform some operations on the operands.They ...read more
Variable in Java
Variable in Java Variable is a name of memory location. Variables are used to hold the ...read more
Modifiers in Java
Modifiers in java There are two types of modifiers in java. 1.Access modifiers 2.Non-access modifiers. 1.Access modifiers Java provides a ...read more
Data Types in Java
Data Types When we create a variable in the program then we reserve some space in ...read more