1.
Install java software:-
1.
Download JDK-7-windows-i586.exe file from
internet( oracle.org)
2.
Double click on jdk-7-windows-i586.exe setup
file.
3.
Click on “yes” button
4.
Click on “next” button
5.
Change jdk install location from “C:\program
file(xso)\java\jdk 1.7.0” to “C:\java\jdk 1.7.0” location bby clicking on
“change” button and “ok” button.
6.
Click on “next” button
7.
Change JRE installation location from
“C:\program file(xso)\java\jrew 7” to “C:\java\jre 7” location by clicking on
“change” button and “ok” button.
8.
Click on “next” button.
9.
Click on “finish” button.
After installation of java software, we have to set “path”
environment variable in order to provide location information to the operating
system, where all JDK tool like javac,
java, javap, javadoc,….. are available.
To set “path” environments variable we have to use the
following comment on commend prompt.
set path=C:\java\jdk 1.7.0\bin;
The above “path” environment variable setup is temporary
setup. That is valid up to present command prompt. it is not valid to other command prompt. If we
want to make available “path” environment variable set to all the command prompts
then, we have to set “path” environments variable permanently.
To set “Path” environment variable permanently we have to
use following steps
1.
Right click on this “pc” or computer on desktop
2.
Select the “properties” options
3.
Click on advanced system “settings” hyperlink
4.
Select “advanced” tag(by default selected)
5.
Click on “environment variable” button
6.
Go to “User variable path” and click on “new
button”.
7.
Provide the following details
Variable name: “Path”
Variable value: “C:\java\jdk1.7.0\bin;”
8.
Click on ok button, ok button and ok button.
If want to switch
java from one version to another version in simplified manner then we have to
use batch files.
To prepare and execute batch file, we have to use the following
steps
1.
Create batch files
a.
Take a test file
b.
Write the required commends in test file same
test file save sest file with “File_Name.bat” Format
Ex:
D:\java3\java6.bat
>>set_path=C:\java\jdk1.6.0_11\bin;
D:\java3\java7.bat
>>set_path=C:\java\jdk1.7.0\bin;
D:\java3\java8.bat
>>set_path=C:\java\jdk1.8.0\bin;
2.
Execute batch files:
a.
Open commend prompt
b.
Go to the location where batch files are saved
by batch file name are click on enter button.
On command prompt
D:\java3\java6.bat--------->enter
(java6 setup will come)
D:\java3\java7.bat--------->enter (java7setup will come)
D:\java3\java8.bat--------->enter (java8 setup will come)
No comments:
Post a Comment