The web site is a http://www.eclipse.org.
Eclipse can be executed on many platforms. Here we want to install it on Linux. Refer,
Select Linux (x86/GTK 2 ).
Download this
Platforms supported by ECLIPSE
At the time of writing this article, the latest version of eclipse is version 3.0, and version 2.1.1 supports C/C ++ development and execution.
Sun JDK must be used to execute eclipse.
1, but the eclipse installation program does not contain Sun JDK,
Red hatlinux 9 does not contain Sun JDK. So next we will download this file. Sun most
The new JDK version can be downloaded to the http://www.javasoft.com, where we use Java 2 SDK (j2se) 1.4.2-01
1. eclipse seems to be compatible with JDK of IBM or other companies, but I have not actually tested it.
After the two software are downloaded, install JDK first (as root ):
[Root @ LJN] chmod 711 j2sdk-1_4_2_01-linux-i586-rpm.bin
[Root @ LJN]./j2sdk-1_4_2_01-linux-i586-rpm.bin
[Root @ LJN] rpm-IVH j2sdk-1_4_2_01-linux-i586-rpm
After the statement is executed, several page copyright statements will appear. Answer yes.
To continue the installation. A
J2sdk-1_4_2_01-linux-i586-rpm archives, next
To use rpm for Installation
[Root @ LJN] rpm-IVH j2sdk-1_4_2_01-linux-i586-rpm
Change the File Permission to executable permissions
After the JDK is installed, it will be stored in the/usr/Java/j2sdk1.4.2 _ 01 directory (the JDK directory names of different versions will be different, for example,/usr/Java/j2sdk1. x. y_zz ).
Make a symbolic connection
[Root @ LJN] ln-S/usr/Java/j2sdk1.4.2 _ 01/usr/Java/JDK
Next we will install eclipse. Here we will install eclipse in the/OPT directory. You will also
You can choose to install it in different directories. Installing eclipse is simple. You only need to unbind the downloaded compressed file:
2. Remove the file to the/OPT directory. If the directory is not
This directory is automatically created if unzip exists.
[Root @ Lyn] unzip-D/OPT eclipse-SDK-2.1.1-linux-gtk.zip
Any version of eclipse (2.1.1 and 3.0 m3 have been installed currently)
And decompress the package to the eclipse directory. If we install different versions of eclipse on the same computer, the previous version will be overwritten unless installed in different directories. Therefore, we extract
/Opt/eclipse
To enable every linux user to execute eclipse, we wrote a script (eclipse. Sh ):
#! /Bin/bash
#
# Document name: Eclipse. Sh
#
# Run eclipse2.1.
#
Export java_home =/usr/Java/JDK
Export classpath =/usr/Java/JDK/lib
/Opt/Eclipse/eclipse-VM/usr/Java/JDK/bin/Java-data ~ /Workspace &
-VM parameters are used to specify which JVM is used to execute eclipse. Here, we specify the previously installed Sun JDK 1.4.2-01-date parameter to tell eclipse to store the project
In which directory. Here we specify
User home directory (~) In the workspace directory
3. Copy clipsem. Sh to/usr/local/bin volumes and set the permissions:
[Root @ LJN] CP eclipse. sh/usr/local/bin
[Root @ LJN] chmod 755/usr/local/bin/eclipse. Sh
You can run eclipse. Sh to start eclipse. See
Screen after eclipse is started
4 if it is too troublesome to use eclipse. Sh every time, we can also set an alias so that users only need to enter eclipse2.1. Please modify the which-2.sh in the/etc/profile. d directory:
Alias eclipse2.1 = '/usr/local/bin/eclipse. Sh'
Add this line to the end.
If this is still too troublesome, we can create a "shortcut" for eclipse on the desktop, just like in a Windows system 」
. See. First, right-click the desktop and
Select "add initiator (a)" as the third option in the window. In
Enter eclipse,
Enter/usr/local/bin/eclipse. Sh in the "Instructions" column, and then press
Click "No icon" on the right of the "icon" column. At this time, press OK to press
The eclipse icon appears on the desktop. You can click it to execute eclipse.
Note:
1. Although Sun JDK and eclipse can be successfully installed in Red Hat Linux 7.x, they will appear when eclipse is executed.
Error while loading Shared Library: libgtk-x11-2.0.so.0:
Cannot load shared object file: no such file or directory error message. I think it may be
The GTK version is too old. Maybe you can update it. Red Hat Linux 8.x9
2. If you want to install CDT in eclipse to write C/C ++ programs, you can install eclipse 2.11. At the time of writing this article, CDT only supports eclip ** 2. 1.
3. Use the eclipse platform for C/C ++ Development
Refer to the two articles
Http://www-900.ibm.com/developerWorks/cn/linux/opensource/os-ecc/index.shtml
Eclipse project CDT (C/C ++) plugin tutorial