To learn Java environment setup on windows 7 then click here
Java environment setup
Step 1) Download and install java
Download and install appropriate Java SE Development Kit as per your windows operating system.
To compile and execute, java program needs the java environment i.e. java installation path.
You can specify java installation path by setting two properties JAVA_HOME and PATH.
There are two ways you can set properties :
"
You can specify java installation path by setting two properties JAVA_HOME and PATH.
There are two ways you can set properties :
- Command prompt
- Click "Search the web and Windows" to search "cmd" and open command prompt.
- Set Java_Home and Path as follows :
c:\> setx PATH "%PATH%;%JAVA_HOME%\bin"
Example :
- Then check java version using the following command :
Example :
Command Prompt |
- GUI
- For Windows 10: Click "Search the web and Windows" to search "This PC" then right click on "This PC" >> "Properties" to open system panel.
- Go to "Advanced" tab on System Properties and click "Environment Variables".
- Variable Name : JAVA_HOME and Variable value :{java_installation_path}
and then click OK.
- To set path, click existing variable "Path" >> click edit >> click on "New" to add java path and click OK.
Add New User Variable |
After following above steps you will be able to setup java environment variables java_home, path and you can start writing and executing a java program.
No comments:
Post a Comment