Install and configure command lines in Linux Eclipse

Source: Internet
Author: User
Tags gtk

Linux Eclipse is a commonly used software for computer players. Then I will study and study Linux Eclipse in depth. Here I will discuss with you how to use Linux Eclipse, hoping to help you. I wonder if Sun's control over the Java release version is in conflict with GNU/Linux. Many Linux releases do not include Sun's JDK or JRE by default. For example,

1-The previous SUSE Linux 9.2 Professional comes with JDK 1.4.2, which can be started directly after Linux Eclipse is downloaded. However, the JDK shadow cannot be found in openSUSE Linux 10.0 RC1, the default Repository does not exist either. You need to install it on your own. Maybe it comes down to the difference between the product positioning of Professional Edition and openSUSE itself ?)

2-in the release of Fedora Core 4, the gnu jre version is included. javac uses the Linux Eclipse version and, of course, Linux Eclipse, but it is a native version based on Linux Eclipse SDK 3.1M6 and CDT. Although these functions can also be used, they are not complete Java, nor are they the original Linux Eclipse. If you do not believe it, you can download the latest Linux Eclipse SDK 3.1.1. After decompression, the interface cannot be started normally.

Since the Linux Release versions we generally obtain are free, rather than Professional or Enterprise Server-level, these versions have limited support for Sun's JDK, in addition, Linux also encourages us to learn how to DIY.

I think it is necessary to install JDK and Linux Eclipse by myself after completing basic Linux configurations. The installation procedure is illustrated in the case of Redhat Fedora Core 4 (http://fedora.redhat.com/), which is widely used and easier to obtain.

<Step 1> Installation preparation

At this time, we can open a command line terminal and enter "java-version" to see the following information:

 
 
  1. [sean@localhost ~]$ java -version  
  2. java version "1.4.2"  
  3. gij (GNU libgcj) version 4.0.0 20050519 (Red Hat 4.0.0-8)  
  4. Copyright (C) 2005 Free Software Foundation, Inc.  
  5. This is free software; see the source for copying conditions.  There is NO  
  6. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

See it? This is not Sun's official Java. We need to download the latest JDK on Sun's website, the current version is JDK 5.0 Update 5, note that there are two versions: jdk-1_5_0_05-linux-i586-rpm.bin and jdk-1_5_0_05-linux-i586.bin, according to the Release Notes of Fedora Core 4, the latter version should be used, that is, the version without rpm.

At the same time, we also need to download the latest Linux Eclipse SDK on Linux Eclipse.org, the current version 3.1.1. Select an appropriate download package based on your system environment. For example, if my computer is x86, X Window uses GNOME 2.10.0, then naturally you should choose "x86/GTK 2", file name Linux Eclipse-SDK-3.1.1-linux-gtk.tar.gz. Note that the default X Window System of FC4 is GNOME, but GTK applications can still be used normally in the KDE environment.

<Step 2> installation and configuration

Now we open a command line terminal, enter the command su, provide the root user password, and enter the Administrator operation mode. Then use ls-l to look at the downloaded jdk-1_5_0_05-linux-i586.bin and you can see that its permission is-rw-r -- and the owner is sean. To be able to execute it, you need to change its permission settings. Knock in the Command chmod + x jdk-1_5_0_05-linux-i586.bin, then look at the permission,-rwxr-xr-x, you can execute.

Switch to the/opt/directory and run the jdk-1_5_0_05-linux-i586.bin. Note: in Linux, the default PATH does not contain the current directory, that is, ".". Therefore, the correct method for executing the file in the current directory is to add "./" before the file name "./". After successful execution, we can find that a jdk1.5.0 _ 05 subdirectory is added to the/opt/directory, which is our JAVA_HOME directory.

This is not complete yet. Check the java-version in the terminal to find the original GNU version. We also need to configure the PATH of the system's environment variable. The current method of checking the PATH content is echo $ PATH, in order to directly find our own java.

You need to add the/opt/jdk1.5.0 _ 05/bin directory to the PATH and put it before the GNU version. The safest way is to put it at the beginning. The method is PATH = "/opt/jdk1.5.0 _ 05/bin: $ PATH ". After that, I typed the java-version, and the correct version came out:

 
 
  1. [sean@localhost Java]$ java -version  
  2. java version "1.5.0_05"  
  3. Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)  
  4. Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) 

To add this path to the environment during login in the future, you need to modify. bash_profile, first cd ~ Go to your home directory, use emacs or vi to edit the file, find the PATH line, and change it:
PATH =/opt/jdk1.5.0 _ 05/bin: $ PATH: $ HOME/bin save, exit, log out, and log on again.

Next, extract Linux Eclipse to a path that you think is appropriate.

<Step 3> start using

There are many ways to run our Linux Eclipse: the command line or file browser can be opened directly. Here is a convenient way to use GNOME: drag and drop the Linux Eclipse running file from the file browser to the system panel and give it a name and icon, in the future, you can click this panel icon to start Linux Eclipse.

Well, I finally saw the familiar Linux Eclipse interface, which was born with a sense of intimacy, isn't it? This Linux Eclipse already comes with a Java development environment. If You Want To Do C/C ++, the CDT under Linux Eclipse is also very good. Of course, N multiple plug-ins were used in the past, let's take a look at yourself. :)

  1. Install Linux Oracle on server B
  2. Migration of Linux Oracle Database Files
  3. Linux management tool installation package and add source
  4. Common commands and functions of Unix Linux operating system
  5. Linux grub partitions D disks using PQMAGIC

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.