Below are the steps for installing Java on Fedora.
1. Download latest JDK set-up file (e.g. jdk-6u22-linux-i586.bin) from
2. Copy the file â€œjdk-6u22-linux-i586.binâ€ at desired location e.g. â€œ/opt/â€
3. Move in to directrory where set-up file has been copied e.g.â€/opt/â€
3. Run the set-up file
4. Now new directory may have been created with name â€œjdk1.6.0_22â€ in current directory .
Now you can remove JDK set-up file from current location e.g. â€œ/opt/â€.
#rm -rf /opt/jdk-6u22-linux-i586.bin
1. Open the â€œ.bashrcâ€ file to set-up the JAVA path
2. Add the following lines at the bottom of the file.
In above path, â€œ/opt/jdk1.6.0_22/bin/â€ is the fully qulified path of â€œbin/â€ directory in â€œjdk1.6.0_22/â€ directory.
In above path, â€œ/opt/jdk1.6.0_22/â€ is the fully qulified path of â€œjdk1.6.0_22/â€ directory.
3. To effect the modification system wide run following command
4. Now you can test java set-up by running following command.
You may get the output as follows
java version “1.6.0_22″
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)