Install eclipse in Linux

Source: Internet
Author: User
This article builds Java, C, C ++ IDE in Linux.
My environment is Red Hat Linux 9 (self-compiled gnome2.4)

1. Download required software (all downloaded software is stored under/OPT)

First download eclipse, web site for http://www.eclipse.org, I am using eclipse2.1; download its GTK version: eclipse-SDK-2.1.1-linux-gtk.zip

JDK is required to run eclipse, but JDK is not included in the installation program of eclipse and Red Hat Linux 9,
Sun's latest JDK version can be downloaded to the http://java.sun.com, here we use sunjdk (j2se) 1.4.2 _ 01 version (can also use ibm jdk ).

To develop C/C ++ programs on Eclipse, you need to install plug-ins separately. Here we use C/C ++
Development tools (CDT ). CDT integrates GCC, make, GDB, and other gun tools (CDT is far inferior to the built-in jdt (Java Development Environment) in eclipse. For example, the refactor, refactoring, and organize imports that are quite useful in jdt are none in CDT .) CDT can be downloaded from the http://www.eclipse.org/cdt/, my version is CDT 1.1 ga2.

Ii. Installation

1. Because CDT requires tools such as GCC, We need to package the software development of red hat9 first,
2. Install JDK as root ):
[Root @ redarmy] chmod + x j2sdk-1_4_2_01-linux-i586-rpm.bin
[Root @ redarmy]./j2sdk-1_4_2_01-linux-i586-rpm.bin
[Root @ redarmy] RPM? IVH j2sdk-1_4_2_01-linux-i586-rpm.bin

The installed JDK will exist in the/usr/Java/j2sdk1.4.2 _ 01 directory.
Set java_home, classpath, path; Add the following four lines at the end of the/etc/profile file:

Export java_home =/usr/Java/j2sdk1.4.2 _ 01
Export Path = $ java_home/bin: $ path
Classpath =.:/usr/Java/j2sdk1.4.2 _ 01/lib/tools. jar: $ classpath
Export classpath

3. Install eclipse

Here I install eclipse under/OPT. It is very easy to install eclipse. just decompress the downloaded compressed package. Unzip the package and get the eclipse directory;

[Root @ redarmy] unzipd/OPT eclipse-SDK-2.1.1-linux-gtk.zip
To enable every account to execute eclipse, I wrote a small script (eclipse. Sh ):

#! /Bin/bash
#
# Execute eclipse 2.1.1
#
Export java_home =/usr/Java/j2sdk1.4.2 _ 01
Export classpath =/usr/Java/j2sdk1.4.2 _ 01/lib
/Opt/Eclipse/eclipse-VM/usr/Java/j2sdk1.4.2 _ 01/bin/Java-data ~ /Workspace &
#-VM parameters are used to specify which JVM is used to execute eclipse,
# The-date parameter is used to specify the eclipse data directory. Specify the user root directory (~) Under the workspace directory

Copy eclipse. Sh to/usr/local/bin and add the permission 755 to it. Now execute eclipse. Sh, that is
Eclipse can be started.

[Root @ redarmy] CP eclipse. sh/usr/local/bin
[Root @ redarmy] chmod 755/usr/local/bin/eclipse. Sh

Add eclipse to the desktop. First, right-click the desktop and select "add startup" in the pop-up menu? Enter/usr/local/bin/eclipse. Sh in "name" and "command", and then
It finds a favorite icon (I use/opt/Eclipse/icon. XPM), and then press "OK" on the desktop.
There is a shortcut for eclipse. You can double-click this icon to start eclipse.
After eclipse is installed, Java Development Environment (jdt) has been built in to develop Java programs directly.

4. Install CDT. Currently, CDT 1.1 Ga only supports eclipse 2.1.

Decompress the downloaded package to obtain the features and plugins directories.

[Root @ redarmy] unzip? D/OPT org.eclipse.cdt-linux.gtk_1.1.0.bin.dist.zip
Cut all the files in these two directories to the corresponding directory in/opt/eclipse respectively.
(Eclipse plug-in security? Almost all of these methods are installed in this way: After downloading the file, you can directly download it to the eclipse installation site.
In the features and Plugins directory .)

Iii. Appendix

If you are not used to the eclipse English environment, you can go up and down on the eclipse.org main site and use its Language Pack. After the Language Pack is installed, the menu is not only Chinese, but its help documentation is also Chinese.

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.