Hadoop 1.1.2 Eclipse Plugin Compilation

Source: Internet
Author: User
Tags gtk

Environment

The code is as follows Copy Code
[Andy@s41 ~]$ Echo $JAVA _home
/usr/java/jdk1.6.0_45
[Andy@s41 ~]$ Uname-a
Linux s41 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 00:31:26 UTC 2013 x86_64 x86_64 x86_64 gnu/linux
[Andy@s41 ~]$ Cat/etc/redhat-release
CentOS Release 6.4 (Final)

Download latest Eclipse

The code is as follows Copy Code
wget http://mirror.bit.edu.cn/eclipse/technology/epp/downloads/release/kepler/SR1/ Eclipse-standard-kepler-sr1-linux-gtk-x86_64.tar.gz
Or
wget http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/ eclipse-java-kepler-sr1-linux-gtk-x86_64.tar.gz&mirror_id=547

Download the Eclipse SDK 4.3.1

The code is as follows Copy Code
http://www.eclipse.org/eclipse4/
wget http://mirror.bit.edu.cn/eclipse/eclipse/downloads/drops4/R-4.3.1-201309111000/ Eclipse-sdk-4.3.1-linux-gtk-x86_64.tar.gz

Extract to the/home/andy directory.
Access to the plugin source directory

The code is as follows Copy Code
[Andy@s41 eclipse-plugin]$ pwd
/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin

Modify Build.properties, increase

The code is as follows Copy Code

eclipse.home=/home/andy/eclipse/
version=1.1.2
[Andy@s41 eclipse-plugin]$ VI build.properties
Output.. = bin/
Bin.includes = meta-inf/,
Plugin.xml,
Resources/,
Classes/,
Classes/,
lib/

eclipse.home=/home/andy/eclipse/
version=1.1.2

Modify Build.xml, add fileset, copy two jar files to new directory

The code is as follows Copy Code
<path id= "Eclipse-sdk-jars" >
<fileset dir= ". /.. /.. /">
<include name= "Hadoop*.jar"/>
</fileset>
...
<target name= "Jar" depends= "compile" unless= "Skip.contrib" >
<!–
<copy file= "${hadoop.root}/build/hadoop-core-${version}.jar" tofile= "${build.dir}/lib/hadoop-core.jar" verbose = "true"/>
<copy file= "${hadoop.root}/build/ivy/lib/hadoop/common/commons-cli-${commons-cli.version}.jar" todir= "${ Build.dir}/lib "verbose=" true "/>
–>
<copy file= "${hadoop.root}/hadoop-core-${version}.jar" tofile= "${build.dir}/lib/hadoop-core.jar" true "/>
<copy file= "${hadoop.root}/lib/commons-cli-${commons-cli.version}.jar" todir= "${build.dir}/lib" verbose= "true" />
[Andy@s41 eclipse-plugin]$ Ant
[ANDY@S41 hadoop-1.1.2]$ CP Build/contrib/eclipse-plugin/hadoop-eclipse-plugin-1.1.2.jar ~/eclipse/plugins/

Previously encountered the following error, the Eclipse SDK and the SDK version does not match the issue.

The code is as follows Copy Code
Compile
[Echo] Contrib:eclipse-plugin
[Javac] compiling source Files To/home/andy/hadoop-1.1.2/build/contrib/eclipse-plugin/classes
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Hadoopperspectivefactory.java:22:package Org.eclipse.jdt.ui does not exist
[Javac] Import Org.eclipse.jdt.ui.JavaUI;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Mapreducenature.java:35:package Org.eclipse.jdt.core does not exist
[Javac] Import org.eclipse.jdt.core.IClasspathEntry;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Mapreducenature.java:36:package Org.eclipse.jdt.core does not exist
[Javac] Import org.eclipse.jdt.core.IJavaProject;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Mapreducenature.java:37:package Org.eclipse.jdt.core does not exist
[Javac] Import Org.eclipse.jdt.core.JavaCore;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizard.java:24:package Org.eclipse.jdt.core does not exist
[Javac] Import org.eclipse.jdt.core.IJavaElement;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizard.java:25:package Org.eclipse.jdt.internal.ui.wizards does not exist
[Javac] Import Org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizard.java:36:cannot Find Symbol
[Javac] Symbol:class Newelementwizard
[Javac] public class Newdriverwizard extends Newelementwizard implements Inewwizard,
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizardpage.java:28:package Org.eclipse.jdt.core does not exist
[Javac] Import org.eclipse.jdt.core.IType;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizardpage.java:29:package Org.eclipse.jdt.core does not exist
[Javac] Import org.eclipse.jdt.core.JavaModelException;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizardpage.java:30:package Org.eclipse.jdt.core.search does not exist
[Javac] Import org.eclipse.jdt.core.search.SearchEngine;
[Javac] ^
[Javac]/home/andy/hadoop-1.1.2/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ Newdriverwizardpage.java:31:package Org.eclipse.jdt.ui does not exist
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.