A project checked out from SVN, found right-click items without bulid path
Take an example to explain
File->import dialog->svn-> to create a new repository location from the SVN checkout project->->url:https://hadoopdb.svn.sourceforge.net/svnroot/hadoopdb
-> from SVN checkout select Trunk Directory-> as project in workspace check out project name: Hadoopdb_trunk Click Finish button.
In the Package Explorer window you can see
Hadoopdb_trunk Item Right-click No bulid path
And the source code is not shown in the form of a package.
This situation is because the. project file is missing
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
Caused by.
As for
Hadoopdb_trunk
|
|---src
|-----java
|-----edu
|----Yale
|----CS
|----hadoopdb
|----Benchmark
| |----Aggtasklargedb.java
| |----class omitted
|----folder omitted
form to show the source, rather than the common
Hadoopdb_trunk
|
|---Src/java
|-----Edu.yale.cs.hadoopdb.benchmark
| |-----Aggtasklargedb.java
| |--Class ellipsis |---packet omitted
This is because the. classpath file is missing
Add the. classpath file under the project path, edited as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<classpath>
<classpathentry kind= "Lib" path= "lib/" Hadoop-0.20.2-ant.jar "/>
<classpathentry kind=" Lib path= "Lib/hadoop-0.20.2-core.jar"/>
< Classpathentry kind= "Lib" path= "Lib/hadoop-0.20.2-test.jar"/> <classpathentry kind= "
Lib" path= "lib/" Hadoop-0.20.2-tools.jar "/>
<classpathentry kind=" src "path=" Src/java "/>
</classpath>
which
is to solve the problem of the form of the source code package described above
<classpathentry kind= "Lib" path= "Lib/hadoop-0.20.2-ant.jar"/> <classpathentry kind= "
Lib" path= "lib/" Hadoop-0.20.2-core.jar "/>
<classpathentry kind=" Lib path= "Lib/hadoop-0.20.2-test.jar"/>
< Classpathentry kind= "Lib" path= "Lib/hadoop-0.20.2-tools.jar"/>
HADOOPDB compiles a jar package that relies on Hadoop, creates a Lib directory under the project directory, and copies four jar packages under Hadoop_home to the Lib directory.
Final problem solved.