Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "EclipseEnvironment" page has been changed by NigelDaley. The comment on this change is: Updated for new eclipse target names. http://wiki.apache.org/hadoop/EclipseEnvironment?action=diff&rev1=27&rev2=28 -------------------------------------------------- * On that page, select New to set the ANT_HOME variable. * If you didn't explicitly install Ant, you can use the Ant plugin that comes with Eclipse (e.g. ${eclipse}/plugins/org.apache.ant_1.7.1.v20090120-1145) 1. Checkout Hadoop. - 1. Run the ''eclipse-files'' and ''compile-core-test'' ant targets (right click build.xml, choose Run As > Ant Build..., click "sort targets", and check the eclipse-files and compile-core-test targets). If you can't click the Run button because of an error that says your .class file version is incompatible with 1.6, then you'll need to click the JRE tab and pick a 1.6-compatible JRE. + 1. Run the ''eclipse'' and ''compile-core-test'' ant targets (right click build.xml, choose Run As > Ant Build..., click "sort targets", and check the eclipse and compile-core-test targets). If you can't click the Run button because of an error that says your .class file version is incompatible with 1.6, then you'll need to click the JRE tab and pick a 1.6-compatible JRE. - * For HDFS, use the targets ''compile'', ''compile-hdfs-test'', and ''eclipse-files'' + * For HDFS, use the targets ''compile'', ''compile-hdfs-test'', and ''eclipse'' - * For MapReduce, use the targets ''compile'', ''compile-mapreduce-test'', and ''eclipse-files'' + * For MapReduce, use the targets ''compile'', ''compile-mapreduce-test'', and ''eclipse'' - * For Zookeeper, use the targets ''compile-test'', and ''eclipse-files'' + * For Zookeeper, use the targets ''compile-test'', and ''eclipse'' * Note that you can turn off the build under the Build tab, and refresh the project on the Refresh tab, avoiding unnecessary steps. 1. Refresh the Eclipse project. (Hit F5 or right-click on the project, and choose "Refresh") 1. If your default Eclipse JRE is not 1.6, go to Project > Properties > Java Build Path > Libraries, select the JRE System Library, click Edit, and select a 1.6 or later JRE that's installed on your system. You may also want to set the Java Compiler's JDK Compliance by going to Project > Properties > Java Compiler, check the "Enable project specific settings", and select 6.0 for the Compiler compliance level. 1. Ensure that the Java version used matches the version of the project (currently 1.6 is used). This could be selected for the project by going to Project > Properties > Builders > Hadoop_Ant_Builders. Go to JRE tab and select an appropriate Java version. 1. Select `Project` | `Build Project`. - - - ==== Behind the scenes ==== - - There is nothing magical about the "eclipse-files" target. It simply copies the files from {{.eclipse.templates}} into your project directory. {{.classpath}} is the file that needs tweaking most often. In the UI, you edit it "Project...Properties...Java Build Path". Similarly the builder (that invokes Ant) can be configured in the UI in the "Builders" property of the project. ==== Troubleshooting ====
