Java configuration under Fedora13

Source: Internet
Author: User
The Java path of Fedora13 is usually/usr/bin/java and is the GNU Java version, which is not suitable for many software. It is best to install Sun's Java, JRE, or JDK separately, and then specify the Java execution path in the system environment. If the rpm. the binfile is placed under/usr/java/and executed. /***. bin, and then the jdk1.6.0 _ 20 or jre-*** is automatically created in the current path.

The Java path of Fedora 13 is usually/usr/bin/java, and it is the GNU Java version, which is not suitable for many software.

It is best to install Sun's Java, JRE, or JDK separately, and then specify the Java execution path in the system environment.

If the rpm. the binfile is placed under/usr/java/and executed. /***. bin. Then, a folder such as JDK 1.6.0 _ 20 or jre-*** is automatically created in the current path. This is the installation path of Java.

Then set the system environment variables. The best way is to modify ". bash_profile file, which can be used to automatically set the Java path and restrict user permissions when a user logs on. In some Linux versions, the. bashrc file is modified, but it is invalid in Fedora.

Add the following lines to the end of the ". bash_profile" file:

JAVA_HOME =/usr/java/jdk1.6.0 _ 20

Export JAVA_HOME

PATH = $ JAVA_HOME/bin: $ PATH

Export PATH

CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar

Export CLASSPATH

Then source ~ /. Bash_profile or log on again.

To declare the Java path for all users, add the preceding command line to the/etc/profile file, and then log on to source/etc/profile or log on again.

If you only want to use it temporarily, you only need to execute the following command in shell:

Export JAVA_HOME =/usr/java/jdk1.6.0 _ 20

Export PATH = $ JAVA_HOME/bin: $ PATH

Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar

In some Fedora versions, the Java path of Firefox also needs to be specified separately by adding a link to the Java Dynamic Link Library in the Firefox plug-in library directory. If the Firefox plug-in library path is: "/usr/lib/firefox-2.0.0.14/plugins/", create a link under it to point to the Java libjavaplugin_oji.so file, the command is:

Ln-s/usr/java/jdk1.6.0 _ 20/jre/plugin/i386/ns7/libjavaplugin_oji.so./libjavaplugin_oji.so

This setting is complete.

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.