Build Linux Ide Environment - ECLIPSE
Seeing an article building an IDE environment on the AID, it feels more complicated, and the application is not very wide; I wrote this post using Eclipse. Eclipse is an open source development environment such as IBM, Borland et al; its function can be extended by plug-in mode; this article constructs Java, C, C IDE under Linux.
The environment I use is Redhat Linux 9 (self-compiling gnome2.4)
1. Download the required software (all downloaded software is put under / OPT)
First download Eclipse, the URL is http://www.eclipse.org, currently, the latest version of Eclipse is also in the test of 2.1.1, 3.0. I use Eclipse2.1; download its GTK version: Eclipse-sdk-2.1.1-linux-gtk.zip
Executing Eclipse is required to use JDK, but the Eclipse installer and Red Hat Linux 9 do not include JDK. The latest version of JDK can be downloaded to http://java.sun.com, where we use Sun JDK ( J2SE) 1.4.2_01 (can also use IBM JDK).
To develop C / C programs on the Eclipse, you need to install plug-inside, where we use C / C Development Tools (CDT). CDT integrates GUN tools such as GCC, Make, GDB, (CDT compared to the JDT (Java development environment) in Eclipse, the function is far away. For example, quite useful Refactor, Refactoring, Organize Imports in JDT Waiting for CDT.) CDT can be downloaded from http://www.eclipse.org/CDT/, currently the latest version is CDT 1.1 GA2.
Second. Installation
1. Since CDT requires GCC and other tools, you must first develop the redhat9 software to pack.
2. Install JDK (required to install 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 exists /usr/java/j2sdk1.4.2_01 directory. Set Java_Home, ClassPath, Path; finally add the following four lines in 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 installed Eclipse under / OPT, installing Eclipse is very simple, just decompress the downloaded compression package; decompress the Eclipse directory;
[root @ redarmy] unzip -d / opt eclipse-sdk-2.1.1-linux-gtk.zip
In order to let each account can perform 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 parameter To specify which JVM uses to execute Eclipse,
# -date parameter to specify the data directory of the Eclipse. Specify this in the Workspace directory in the user's root directory (~)
Copy Eclipse.sh to / usr / local / bin and add permission 755; now you can start Eclipse.sh.
[root @ redarmy] cp eclipse.sh / usr / local / bin
[root @ redarmy] chmod 755 /usr/local/bin/eclipse.sh
Add Eclipse to your desktop. First, press the mouse button on the desktop and select "New Start" in the pop-up menu, and then enter the eclipse, "command" in "Name", and then fill the /usr/local/bin/eclipse.sh, then It's just looking for a favorite icon (I use /opt/eclipse/icon.xpm); then press "OK", there is a shortcut to Eclipse on the desktop, and you can directly double-click this icon to start Eclipse.
After Eclipse is installed, the Java Development Environment (JDT) has been built into the Java program.
4. Install CDT, CDT 1.1 GA is currently only supporting Eclipse version 2.1.
Will download the downloaded package, you will get two directories of Features and Plugins
[root @ redarmy] unzip -d / opt org.eclipse.cdt-linux.gtk_1.1.0.bin.dist.zip
All files in these two directories are separately cut into the corresponding directory under the / OPT / Eclipse, respectively. (Eclipse's plugin installation method is almost so installed: After downloading the file, you can directly solve the corresponding Features and Plugins in the directory installed in Eclipse.)
3. Program instance
This is not much better, for C, C , is a first write source program, and then write a Makefile.
Four: Attachment
If you are not used to, the Eclipse English environment can be up and down on the master of Eclipse.org; after installing the language pack, the light menu is in Chinese, and its help document is also Chinese.