Wednesday 9 November 2016

Java Installation and Environment Setting



We are going to learn about how to download , install Java and set Environment setting to make a Java program run.


Installation:
  • Download the latest version of  Java from http://java.sun.com.
  • Click on Download button to go  to download page and start download the latest version available there. 





  • Assume that Java installed in  C:\Program Files\Java\jdk
  • If installation is done properly you can see two files  java and javac in C:\Program Files\Java\jdk\bin
Environment Setting:

Now the next step is environment and path setting. There are two ways to accomplish this 

Temporary Path Setting: 
  • Open the command prompt 
  • Write the command on the command prompt according to the following format                                                 C:\Program Files\Java\jdk\bin
  • To check weather path has been set or not, write javac and press ENTER. If the list of options displayed, means that you have successfully completed the steps of path setting. 
  • The above procedure is shown in the picture given below: 


The issue with this procedure is that you have to repeat this again and again each time you open a new command prompt window. To avoid this overhead, it is better to set path permanently.

Permanent Path Setting: 
  • Write click on My Computer icon and click on Properties
  • Then select Advanced tab and click on Environment Variables
  • Now click on new and then in variable name field write path and in variable value field write path of the bin folder i.e C:\Program Files\Java\jdk\bin.

  • Press OK button.
  • Now open command prompt and write javac, and press Enter key. A list of  option would be displayed. 
  • After setting path by this method , you have no need to set path for each new opened command prompt. 



No comments:

Post a Comment

If you have any doubt please let me know

Methods in JAVA Language

 In general, a way may be thanks to perform some task. Similarly, the tactic in Java may be a collection of instructions that performs a sel...