Thursday, December 22, 2016

How to Install JAVA Part-1

Step Prepare First JAVA Application:

--------------------------------------------------------------------
1. Install JAVA Software
2. Select JAVA Editor
3. Write JAVA Program
4. Save JAVA File
5. Compile JAVA File
6. Execute JAVA Problem

1. Install JAVA Software:

--------------------------------------
i. Download jdk file from Oracle or Click Here.
   (Accept the terms and click on the link according to your OS).
ii. Double click on jdk-8u111.exe file.
iii. Click on “Yes” Button.
iv. Click on “Next” Button.
v. Change jdk Installation location from “C:\Program file(x86)\Java\jdk1.8.0_111” to
      “C:\Java\jdk1.8.0_111” by clicking on change button and OK button.
vi. Click on “Next” Button.
vii. Change jre installation location from “C:\Program file(x86)\Java\jre8” to
       “C:\Java\jre8” by clicking change Button and OK button.
viii. Click on “Next” Button.
ix. Click on “Close” Button.

After Installation of JAVA Software, we have to set “path” environment variable to the location where JAVA commands like javac, java, javap, javadoc,… are existed, that is  “C:\Java\jdk1.8.0_111\bin”.

In command prompt:

set path= C:\Java\jdk\1.8.0_111\bin;

Note: the main intention to set “path” environment variable to give location information of all JAVA commands like javac, java, … to the operating system in order to execute.

The above “path” setup is temporary setup, it is valid up to the present command prompt only. If we want to set “path” environment permanently then we have to use the following steps:
a) Right Click on “This PC” on desktop.
b) Select “Properties”.
c) Click on “Advanced System Setting”.
d) Select “Advanced Tab” (By Default Selected).
e) Click on “Environmental Variable” Button.
f) Goto user variables section and click on “New” Button.
g) Provide the following details:
variable name: path
variable value: C:\Java\jdk1.7.0_79\bin;
h) Click on “Ok” Button.
i) Click on “Ok” Button.
j) Click on “Ok” Button.
----------------------------------------------------------------------------------------

2. Select JAVA Editor:

Editor is a Software, it will provide very good environment to write java programs & to save JAVA program into our system.
EX: Notepad, Notepad++, EditPlus…

Note: In real time application development, it is not suggestible to use editors, always it is suggestible to use IDEs[Integrated Development Environments]
EX: Eclipse, MyEclipse, Netbeans, Intellij,…..

---------------------------------------------------

 3. Write JAVA Program:

--------------------------------------
In JAVA application, we will write program by using JAVA predefined library, providing by JAVA API[Application Programming Interface].

EX: File Name: D:\java10\FirstApp.java


Properties of  a JAVA File

No comments:

Post a Comment