Linux under Eclipse

Source: Internet
Author: User
Tags gtk

Recently wanted to learn C + +, so I reinstalled the Linux system, although there is no connection between the two, but I still prefer the Linux system, so installed in Linux eclipse, think of the original Red Hat 9.0 when the pain of the scene, ah ... So I intend to write down the installation process, I hope to those who have just contact with Linux friends some help, the veteran can skip, hehe!

Installing eclipse requires two things, One is the Eclips installation file (eclipse-cpp-helios-linux-gtk.tar.gz), one is the JDK (Jdk-6u16-linux-i586.bin), the two software should be on the Internet, I will not provide, we can find their own.

First of all, we have to put these two files into the Linux system, because I use VM virtual machine, so I installed Vmtools, so that I directly drag files to Linux, I set up in the root directory called MyData folder, Inside, I created a folder called tool, and I dragged the two files into the tool.

Open the terminal (it is best to use root, because it requires root user permissions),

[[Email protected] ~]# CD/

[[Email protected]/]# CD Mydata/tool//Enter Mydata/tool directory

[[email protected] tool]# ls//view directory file

[[Email protected] tool] #tar-XZVF eclipse-cpp-helios-linux-gtk.tar.gz//decompression eclipse this software

[[email protected] tool]# ls//View the file in the directory and the Eclipse folder will appear

[[Email protected] tool]# CD Eclipse//Enter eclipse this folder

[[email protected] eclipse]# ls//view the files under Eclipse files, there will be an executable file called Eclipse, now we might as well run, (anyway, can't run, hehe)

[Email protected] eclipse]#./eclipse//Pay attention to that point, don't lose it.

We ran eclipse, but we were prompted by the system: Version 1.4.2 of the JVM was not suitable for this product. version:1.5 or greater is required.

The main idea of this sentence is that the JVM version of my system is 1.4.2, which requires a version of 1.5 or higher.

Here we are very clear, to upgrade. OK, the second software is on the pitch:

[Email protected] eclipse]# CD. Return to the top level directory

[[email protected] tool]#/jdk-6u16-linux-i586.bin//install JDK6.0 that's 1.6, pay attention to that point.

At this point, you may not be able to execute, when you look at the permissions, you will find that you do not have permission to execute, some friends may be strange, I am the root user ah, but, the fact is, you do not have enough authority, well, we have to improve permissions

[Email protected] tool]# chmod 777 Jdk-6u16-linux-i586.bin

[Email protected] tool]#./jdk-6u16-linux-i586.bin

Start reading ************************************** ********************************

This step is actually an decompression process, press the ENTER key can page, when prompted, enter Yes

When you're done, let's take a look at the files below this tool

[[email protected] tool]# LS//Now, more than one Jdk-1.6.0_16 folder

[[Email protected] tool]# mv jdk-1.6.0_16 jdk6//Change jdk-1.6.0_16 to Jdk6 (personal habits can not be changed, but pay attention to the name later)

[[Email protected] tool]# CD JDK6//Enter Jdk6 folder

[[Email protected] jdk6]# CD bin//Enter the Bin directory (two steps can be written together, hehe)

Into the bin directory, we run the Javac command, but still can not run, learn Java friends may think, we want to configure environment variables, yes, is the problem of environmental variables. OK, know the problem, start to do it, hehe!!!

[[email protected] bin]# path=/mydata/tool/jdk6/bin//configuration path, note case

[[email protected] bin] #echo $PATH//View the configuration of PATH, which is generally displayed/mydata/tool/jdk6/bin

Note that at this point path is overwritten, many commands will not be used, but, do not worry, such a configuration is only for the terminal opened at this time, when the terminal is closed, the configuration is not valid, below, we first run eclipse, Let's fix the problem of how to use the 6.0 JVM at any time without overwriting the previous path path.

[[email protected] bin] #cd/

[Email protected]/]# CD Mydata/tool/eclipse

[Email protected] eclipse]#./eclipse

Ah, again error, okay, let's see what's Wrong ******************************* **********************

Failed to load the JNI share Library "/mydata/tool/jdk6/bin/.../jre/lib/i386/client/libjvm.so"

A word, permission problem, OK, shut down the firewall. Remember I said earlier, path is overwritten, so at this time the service command can not be used, we will not shut down the firewall, but it doesn't matter, re-open a terminal on the line. After restarting the terminal, we can first do without the firewall, we first solve the previous said, how can be used at any time 6.0 of the JVM does not overwrite the previous path path problem

[[Email protected] ~] #cd/etc

[[email protected] etc]# Gedit profile//Note profiles must not be arbitrarily modified, this may cause the system blue screen, please pay attention to

At this point we can edit the profile, and at the very end of the file, add the following command:

Java_home=/mydata/tool/jdk6

Path= $JAVA _home/bin: $PATH

Export Java_home PATH

Save exit

[[email protected] etc] #source/etc/profile//restart (not the computer, hehe, of course, restart the computer, the effect can be)

[email protected] etc] #cd Mydata/tool/eclipse

[Email protected] eclipse]#./eclipse

Run or error, but, don't worry, look closely, this is not just we have not solved the permissions problem? *****************

Let's deal with him now.

[[email protected] Eclipse] #service iptables stop

[[email protected] Eclipse] #setenforce 0

Well, start running our Eclipse bar ********************

[Email protected] eclipse]#./eclipse

OK, we did it, huh?

Linux under Eclipse

Related Article

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.