现象
在eclipse里用subeclipe从svn上拖下来的项目,看不见java build path怎么办?
原因
那是因为你的两个配置文件:.project .classpath没有内容或者缺失。
解决
以一个maven管理的java项目为例。
用下面内容替换掉.project文件
<?xmlversion="1.0"encoding="UTF-8"?>
<projectDescription>
<name>fastjson_source</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
.classpath 文件
<?xmlversion="1.0"encoding="UTF-8"?>
<classpath>
<classpathentrykind="src"output="target/classes"path="src/main/java"/>
<classpathentryexcluding="**"kind="src"output="target/classes"path="src/main/resources"/>
<classpathentrykind="src"output="target/test-classes"path="src/test/java"/>
<classpathentryexcluding="**"kind="src"output="target/test-classes"path="src/test/resources"/>
<classpathentrykind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentrykind="con"path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentrykind="lib"path=".project"/>
<classpathentrykind="output"path="target/classes"/>
</classpath>