Download JDK
Http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-i586.tar.gz
Download eclipse-cpp-ganymede-sr2-linux-gtk.tar.gz
Http://archive.eclipse.org/technology/epp/downloads/release/ganymede/SR2/eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz
Unzip the downloaded two packages to the appropriate installation directory.
When you run Eclipse, the window is left blank, unable to open, and later found errors in the Workspace/.metedata/.log file, Org.eclipse.swt.SWTError:XPCOM error. Here's how Google finds it. XULRunner is a problem, if your XULRunner version is 1.9 and above, add this line in the Eclipse.ini file (located in the Eclipse directory)- Dorg.eclipse.swt.browser.xulrunnerpath=/usr/lib/xulrunner can be. After you restart Eclipse, you can then delete the row, and you will not be able to start the error later.
To add configuration information for the JDK in. BASHRC:
Export Java_home=/opt/jdk1.7.0_04
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
To test the JDK environment:
$ VI Test.jave
Class Test
{
public static void Main (string[] args)
{
System.out.println ("Hello world!");
}
}
$ Java Test
Hello world!
Indicates that the environment is already configured.
Configure code completion:
Open Eclipse,window->preferences->general->keys, modify the binding key for content assist, because the default is Ctrl+space, which conflicts with IME.
Text Auto-Complete:
Open Eclipse,window->preferences->general->keys, modify the binding key of the context completion, can automatically complete the custom variable or function.
Specify the header file:
In embedded development, the kernel header file used is not the same as the application programming header file. Project->properties->c/c++ general->paths and Symbols->include add the corresponding kernel header file directory, for example:/usr/src/ Linux-headers-2.6.32-5-common/include or/home/fantity/kernel/linux/linux-2.6.39.4/include/and so on.
Reference:
http://galigio.org/2011/03/07/kernel-development-using-the-eclipse-ide/
http://blog.csdn.net/jubincn/article/details/6212562
Build an embedded development environment with eclipse