今天在學習時,試着把myeclipse中的web progect導入到eclipse中,發現運行不了,連那個run on server都出現不了,只會出現那個run Configurations,試了很多遍都不行,最後在網上找到了解決辦法。
步驟是這樣的:
1.可以用記事本打開的那個引入項目的.project,然後在裏面添加一個配置如下:
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
把下面的<natures></natures>裏 的內容替換爲
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
2.點擊項目刷新,點右鍵,選properties——>project facets,然後我是這樣選的
3.找到本項目的.settings目錄,將其中名爲org.eclipse.wst.common.component的文件用記事本打開,然後可以看到其中一行是這樣的 <wb-resource deploy-path="/" source-path="/WebContent"/>,把這行修改爲
<wb-resource deploy-path="/" source-path="/WebRoot"/>
4.刷新,運行就能看見那個run on server 啦。