Run the JAVA program-JRE installation and configuration in Linux

Source: Internet
Author: User
In Linux, run the JAVA program-JRE installation and configuration-general Linux technology-Linux programming and kernel information. The following is a detailed description. To run a JAVA program, you must install java runtime, that is, the environment required for running the program. You can install JRE or JDK. If we only use applications instead of development, it is enough to download only the JRE package. The JDK package also contains JRE. This article takes JRE installation as an example. The JRE also includes the JAVA Plug-in required by the browser;

1. Download JRE;

Http://ftp.isu.edu.tw/

According to your own machine to download the corresponding version, my machine is 32-bit X86 machine, so only download the jre-1_5_0_04-linux-i586.bin in the linux32 directory; if you are a X86-64 bit machine, download relative;

Http://ftp.isu.edu.tw/pub/Sun/ja... 0_04-linux-i586.bin

2. decompress and configure the package;

1. Release the software package;



[Root @ localhost sunjava] # ls
Jre-1_5_0_04-linux-i586.bin
[Root @ localhost sunjava] # sh jre-1_5_0_04-linux-i586.bin
Do you agree to the above license terms? [Yes or no] yes
[Root @ localhost sunjava] # ls
Jre-1_5_0_04-linux-i586.bin jre1.5.0 _ 04

2. Configure JRE;


1) Move the jre1.5.0 _ 04 directory to the/usr/lib directory.


[Root @ localhost sunjava] # mv jre1.5.0 _ 04/usr/lib/jre154

2) Configure environment variables;


Add three lines to the. bashrc file of the current user:


JAVA_HOME =/usr/lib/jre154
JAVA_BIN =/usr/lib/jre154/bin
Export JAVA_HOME JAVA_BIN

You can use gedit or vi to edit the. bashrc file;


[Root @ localhost sunjava] # gedit ~ /. Bashrc
[Root @ localhost sunjava] # vi ~ /. Bashrc

3) Add a simsun. ttf font;

Create a directory fallback in/usr/lib/jre154/lib/fonts and copy the simsun font. ttf to this directory, or put simsun. copy the ttc file to simsun. ttf also works, and then put it in this directory;




[Root @ localhost ~] # Mkdir/usr/lib/jre154/lib/fonts/fallback

4) install java plugins to allow the browser to support java programs;

For example, if I use the firefox browser, I will create a plugins directory for libjavaplugin_oji.so to link to the corresponding directory of firefox. The same applies to other browsers;

[Root @ localhost plugins] # cd/usr/lib/firefox-1.0.6/plugins/
[Root @ localhost plugins] # ln-s/usr/lib/jre154/plugin/i386/ns7/libjavaplugin_oji.so.

5) Call the JAVA console;

[Beinan @ localhost ~] #/Usr/lib/jre154/bin/ControlPanel

Test address: http://www.icq.com/icq2go




(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // linux.chinaitlab.com/uploadfiles_7565/200601/20060424102558901.jpg'); ">
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.