Install and configure Java in Fedora8

Source: Internet
Author: User
There are three types of Java available under Fedora8: the official SunJava, the open-source GNU gcj, And the SunJava-based open-source JDK (OpenJDK ). IceTea is installed for standard Fedora8 installation. It is based on OpenJDK and is more complex than GNU gcj, but its performance is still different from SunJava. You can get more messages about Fedora8 in the release notes. 1. IcedTeaIcedTea is likely to install Fedora

There are three types of Java available under Fedora8: the official SunJava, the open-source GNU gcj, And the SunJava-based open-source JDK (OpenJDK ). IceTea is installed for standard Fedora8 installation. It is based on OpenJDK and is more complex than GNU gcj, but its performance is still different from SunJava. You can get more messages about Fedora8 in the release notes.

1. IcedTea

IcedTea may have been installed when Fedora8 is installed. If not, use yum for installation.

[Mirandam @ charon ~] $ Sudoyuminstalljava-1.7.0-icedteajava-1.7.0-icedtea-plugin

After IcedTea is installed, Java programs and Webapplets should work automatically. If the browser plug-in of IcedTea is not automatically loaded by Firefox or Mozilla, you can use the following command to manually load it:

[Mirandam @ charon ~] $ Sudo/usr/bin/mozilla-plugin-config-I-f

2. SunJava

If you want to use SunJava to replace IcedTea, you can download and install it online. Sun officially provides RPM packages, but I do not recommend using them directly. Download the Java package from the following URL:

Http://java.sun.com/javase/downloads/index.jsp

Select JavaRuntimeEnvironment (JRE) 6Update3 (JDK is not recommended for routine use and is used for development ). Accept the licenseagreement on the following web page, and then select the appropriate package based on your CPU, for example:

Linuxself-extractingfile jre-6u3-linux-i586.bin 18.23 MB.

After the download, you can install it:

[Mirandam @ charondownloads] $ shjre-6u3-linux-i586.bin

Some protocols will appear here. The program will automatically decompress the tab with spaces and enter yes. After decompression, move the extracted file to the specified location:

[Mirandam @ charondownloads] $ sudomv-fjre1.6 */opt/jre1.6

Then we need to set up so that the system can automatically call SunJava instead of IcedTea or GNU gcj.

[Mirandam @ charondownloads] $ sudo/usr/sbin/alternatives -- install/usr/bin/javajava/opt/jre1.6/bin/java20000

[Mirandam @ charondownloads] $ sudo/usr/sbin/alternatives -- install/usr/lib/mozilla/plugins/libjavaplugin. solibjavaplugin. so/opt/jre1.6/plugin/i386/ns7/libjavaplugin_oji.so20000

Note:

1. If you want to switch back to IcedTea, you need to re-execute the preceding two commands, but replace 20000 with 15000;

2. To make SunJava's browser plug-in work properly, compat-libstdc ++-33 may be required. For the installation method, see the previous article.

3. if you encounter a bug when using the SunJava plug-in, you can use the following method to make it work properly:

[Mirandam @ charon ~] $ Cd/opt/jre1.6/lib/i386/xawt/

[Mirandam @ charonxawt] $ sudocplibmawt. solibmawt. so. orig

[Mirandam @ charonxawt] $ sudosed-I's/XINERAMA/FAKEEXTN/G' libmawt. so

You can also consider returning libX11 to an old version.

4. It is easy to upgrade SunJava. just delete the original/opt/jre1.6 folder and copy the new folder.

Note: I am using SunJava, but I have never encountered any plug-in problems. Therefore, the browser plug-in mentioned in this article is just "published by nature. In addition, if you want to use SunJava, You must select the JRE that works with your system during the download to see whether it is x86 or amd64.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.