I have done near two months in Linux, I feel not very cool. I have long heard of the name of Eclipse. I also tried to match an Eclipse under Windows. I want to use it under Linux, but I am too busy, BOSS is urgent, I can only put it one. . Now work is basically completed, there is time to be idle, and I have a Eclipse to install.
It's really strange, I think the open source Eclipse should have more information on the open source Linux. As a result, in Google's previous search, even out of my expectation, the information under Windows is more than Linux. The information is really depressed. No matter what he, I will go to http://www.eclipse.org/ go to an Eclipse back, you have to ask the version a few, of course, it is the latest, no one goes to 1.0, huh, huh. There are more than 80 M, I have downloaded it, and then I will go back to Java 2 SDK1.4.2. No way, who makes Eclipse to be compiled with Java? I mainly make C / C programming, of course, the next CDT plugin, under http://www.eclipse.org/cdt, according to your own version, of course, we will try to find new. .
Everything is going down, just prepare it. I press this prawns on the Internet, copying java2sdk to / usr below, I am a rpm bin file, is an executable file, but there is no permission to be executed, the first thing to do is changing its file properties: chmod U X J2SDK1.4.2-RPM. You can then install it with RPM-IVH J2SDK1.4.2-RPM. After installation, a Java directory will be added under / usr. First enter the / usr / java directory, see what the Java's bin directory is, then add some directory paths that run the java command to the PATH environment variable according to these modified / etc / profile files. In the end of the / etc / profile file, add the following sentences:
Export java_home = / usr / java / j2sdk1.4.2
Export Path = $ java_home / bin /: $ path: / usr / eclipse
Export classpath =.: $ java_home / lib / rt.jar: $ java_home / lib / Tools.jar
Oh, I also added Eclipse's running catalog, lest it later, huh, huh, secret lazy, no one mind.
Here, I will say a few words, we know that in the * NIX system, there are three kinds of shells, namely, Bourne Shell (SH), C shell (CSH) and Bourne Again Shell (Bash), Where SH is the first shell in the UNIX system, basically all of the UNIX is equipped with SH, with a programming interface is excellent, but the user interface is not so friendly. CSH more considers interface-friendly and uses C syntax, but it is generally considered that the CSH programming interface is not as good as SH. Bash is the extension of the SH, and it is fully compatible with SH, which is the default shell of most version Linux. To see the current path environment variable, you can use the following command under Bash:
Echo $ PATH
Telling such a nonsense, because I have started hurting N days, I didn't know which corner found a shabby martial arts cheat, I suddenly turned over. Nowadays, Shaolin Temple will open the Yi gluten, I dare to hide private? Next, extract the Eclipse:
Unzip eclipse3.0.1.zip
Run the eclipse command by using the decompressed ECLISE directory mv to / usr directory. What, no response, huh, no response is normal, this is because although the Java and Eclipse paths are added to / etc / profile, this file is called by Bash when logging in, you join the way. It will not run, you can use the following command to load / etc / profile files:
Source / ETC / PROFILE
Now use Echo $ PATH to see if the Java and Eclipse directories are added. If you can't, pay attention to check whether it is correct in the / etc / profile file. If there is a mistake, you can only make yourself.
Ok, now run Eclipse, um, it failed. Oh, Eclipse requires running under GTK, how can you run STARTX to GTK under text mode? Ok, now Eclipse has been installed, but our work has not yet finished, and I haven't added CDT to Eclipse.
First, turn off the running Eclipse. Decompress the downloaded CDT package, extract the contents of the Features and Plugins directories in the extracted Eclipse directory to the corresponding directory below / usr / eclipse. Run Eclipse, OK, now finally complete the Eclipse and CDT installation.
Now let's enjoy Eclipse brings us a familiarity and warmth under Linux.