Summary of default OPENJDK and SUNJDK issues for Eclipse in Ubuntu

Source: Internet
Author: User

Today in the Ubuntu 12.04 X86 virtual machine environment to build a C + + development environment, the default download is eclipse-cpp-mars-r-linux-gtk.tar.gz with CDT, about CDT is described as follows: "Eclipse CDT (C /c++ Development Tooling) Eclipse CDT is the Eclipse plugin, which transforms eclipse into a powerful C + + IDE. It has been designed to provide C + + developers with many of the Eclipse's best features that Java developers love, such as project management, integrated debugging, Class wizards, auto-build, syntax coloring, and code completion. When Eclipse is used as the Java IDE, it leverages and integrates with the JDK. In the same way, the CDT will leverage and integrate with standard C + + tools, such as g++, make, and GDB. This makes the CDT very popular in Linux "! The main note here is: When the eclipse-cpp is downloaded, the normal situation is decompression, you can use the C + + development environment of Eclipse, because Linux is the default with Gcc,g++,gdb and other tools, unlike the Windows platform need to install: " MinGW Installer "! But the reality is: the direct operation of Eclipse is not fully run ECLIPSE-CDT function, no new CPP project, find a half-day, only to find that the Ubuntu JDK environment by default is open source OpenJDK so, can not fully support eclip SE-CDT function; Go to the ORACLE website to download the JDK for the platform,,, and then install SUN-JDK, unzip to the appropriate location, set environment variables,,, configure environment variables: If you have Vim installed on the machine, please run VIM ~/.BASHRC if not, you can open it with gedit, run Gedit ~/.BASHRC Add the following to the environment variable: Export Java_home=/usr/lib/jvm/java-7-sun export Jre_home =${JAVA_HOME}/JRE Export Classpath=.:${java_home}/lib:${jre_home}/lib Export path=${java_home}/bin:$PATH: "Java-7-sun" is to download the Oracle website JDK, modify the name, put it in the appropriate location; Save the environment variable, exit the editor, and enter the following command to make the environment variable effective source ~/.BASHRC Configure the default program sudo update -alternatives--install/usr/bin/java Java/usr/lib/jvm/java-7-sun/bin/java sudo update-alternatives--install/usr /bin/javac Javac/usr/lib/jvm/java-7-sun/bin/javac sudo update-alternatives--config java sudo update-alternatives- -config Javac If you have other JDK installed on your system, you will be prompted to select Jdk7 to test the version of the following JDK, enter the following command in the terminal java-version javac-version Reference:/http blog.chinaunix.net/uid-26746189-id-3470191.html Restart Eclipse,ok 2015/10/25 Liuck

Eclipse default OpenJDK and SUNJDK issues summary in Ubuntu

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.