Build an IDE environment in Linux-Eclipse

Source: Internet
Author: User
Tags gtk
Build an IDE environment in Linux-Eclipse

Summary

Eclipse is an open-source development environment funded by IBM and Borland. Its functions can be extended through plug-ins. This article builds Java, C, and 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)

Download eclipse first, web site for http://www.eclipse.org/Currently, the latest version of eclipse is 2.1.1, version 3.0 is also being tested. I'm using eclipse2.1; download its GTK version: eclipse-SDK-2.1.1-linux-gtk.zip

JDK is required to execute eclipse, but the installation program of eclipse and Red Hat Linux 9 does not contain JDK, JDK of the latest version of sun can be downloaded to the http://java.sun.com, here we use sun/JDK (j2se) 1.4.2 _ 01 (you 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/, the latest 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. Installing 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] unzip-D/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 permission 755 to it. Now execute eclipse. Sh to start eclipse.

[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 in eclipse and command in "name. sh, and then find a favorite icon for it (I use/opt/Eclipse/icon. XPM). Then, press "OK". The eclipse shortcut is displayed on the desktop. 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. (Almost all Eclipse plug-in security methods are installed like this: After downloading the file, you can directly find the corresponding features and Plugins in the eclipse installation directory .)

Iii. Appendix

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

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.