How to install Eclipse on Red Hat Linux 9

xiaoxiao2021-03-06  62

PDF Format Document Download first download Eclipse, URL is http://www.eclipse.org.

Eclipse can perform on many platforms, here we have to install on Linux, refer to the following figure,

Please select Linux (x86 / gtk 2).

Download this

The platform supported by Eclipse

When writing this article, the latest version of Eclipse is version 3.0, version 2.1 supports C / C development execution.

SUN JDK must be used when performing Eclipse

1, but Eclipse installer does not include Sun JDK,

And Red Hatlinux 9 does not contain Sun JDK. So let's download the file next. Sun most

The new version of JDK can be downloaded to http://www.javasoft.com, where we use Java 2 SDK (J2SE) 1.4.2-01 version

1, Eclipse seems to be a JDK of IBM or other company, but I have not actually tested.

After the two software is downloaded, we will install JDK first (you need to install 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

A number of copyright statements that will appear after execution, answer Yes

You can continue to install. A will result in one after completion

J2SDK-1_4_2_01-Linux-i586-RPM file, next

To use RPM to install

[root @ljn] rpm -ivh j2sdk-1_4_2_01-linux-i586-rpm

Change file permissions to executable files

The installed JDK will be stored in the /usr/java/j2sdk1.4.2_01 directory (different versions of JDK directory names are different, such as /usr/java/j2sdk1.x.y_zz).

Do a symbolic connection

[root @ljn] ln -s /usr/java/j2sdk1.4.2_01 / usr / java / jdk

Next we have to install Eclipse, here we install Eclipse in / opt this directory, you also

You can choose to install it in other different directories. Installing Eclipse is very simple, just solve the downloaded compressed file:

2 Specify the file to solve the file in the / OPT directory, if the directory is not

The unzip will automatically establish this directory

[root @ljn] unzip -d / opt eclipse-sdk-2.1.1-linux-gtk.zip

Regardless of which version of Eclipse (currently installed in 2.1.1 and 3.0 m3)

After decompression, it will be solved in the eclipse directory. If we install different versions of Eclipse on the same computer unless installed in different directories, the previous version will be overwritten. Therefore, we will just decompress it.

/ OPT / Eclipse

In order to make each Linux user execute Eclipse, we wrote a script (eclipse.sh):

#! / bin / bash

#

# 文 号 Name: Eclipse.sh

#

# Execute Eclipse2.1 version

#

Export java_home = / usr / java / jdk

Export classpath = / usr / java / jdk / lib

/ OPT / Eclipse / Eclipse -VM / USR / Java / JDK / BIN / JAVA -DATA ~ / WORKSPACE & -VM parameter to specify which JVM to perform Eclipse, here we specify Sun JDK 1.4.2 installed before -01 version -date parameter to tell Eclipse to store items

In which directory is in. Here we specify that stored

User Home Catalog (~) Workspace Directory

3 Next we copy clipsem.sh to / usr / local / bin and set its permissions:

[root @ljn] cp eclipse.sh / usr / local / bin

[root @ljn] chmod 755 /usr/local/bin/eclipse.sh

The Eclipse.sh executes Eclipse.sh at this time can be activated. Please refer to the following figure

Eclipse after the startup screen

4 If you have to hit Eclipse.sh every time, we can also set an alias that allows the user to enter Eclipse2.1. Please modify the Which-2.sh under the /etc/profile.d:

Alias ​​Eclipse2.1 = `/ usr / local / bin / eclipse.sh`

At the end, add this line.

If this is still too trouble, we can also build a "shortcut" on the desktop like a Windows system.

. Please refer to the figure below;

First, press the mouse button on the desktop and jump out

Select the third option in the window "Add the starter (a)", which will appear on the picture above. Respectively

Enter Eclipse in the "Name" column.

Enter /usr/local/bin/eclipse.sh in the "instruction" column, then press

The "Icons" bar on the "No Icon" button on the right side of the "Icon" bar. Press OK at this time.

The Eclipse icon that will appear on the button desktop, you can choose the icon directly to perform Eclipse.

Remarks:

1. Although Sun JDK and Eclipse can be successfully installed in the Red Hat Linux 7.x version, it will appear when performing Eclipse, but Error While Loading Shared Libraries: 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 relationship, maybe update GTK. Red Hat Linux 8.x, 9

2. If you want to install CDT in Eclipse, you can install the Eclipse version 2.11. CDT only supports Eclipse 2.1.x when writing.

3. C / C development with Eclipse platform

Refer to these two articles

http://www-900.ibm.com/developerWorks/cn/linux/opensource/os-ecc/index.shtml

Eclipse Project CDT (C / C ) PLUGIN TUTORALIAL

转载请注明原文地址:https://www.9cbs.com/read-119215.html

New Post(0)