GWT,Eclipse插件如何将项目与.gwt.xml文件一起重命名? 尝试这样做时会出错

我花了一段时间在这上面搜索,我发现的任何内容似乎都与我的问题无关。 我正在进行RPC调用,所以我想改变我的一个Web服务的路径。

它就像mytestproject并希望将其更改为finalprojectname

我转到mytestproject.gwt.xml文件并将更改为

然后我运行它并得到一个错误, [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

然后我将mytestproject.gwt.xml更改为finalprojectname.gwt.xml但仍然得到了相同的结果。

我查看了每个可能的文件,但无法找到为什么它认为该项目仍然命名为mytestproject 。 我已经清理并重建了项目等,但仍然是一样的。 我仍然是Java的新手,所以也许我错过了一些明显的东西。 如果有人能提供任何建议,我将不胜感激。 谢谢

要将项目从“mytestproject”重命名为“finalprojectname”:

  1. 在.gwt.xml文件中,进行更改
    rename-to="mytestproject" to
    rename-to="finalprojectname"

  2. 在.html文件中,进行更改
    src="mytestproject/mytestproject.nocache.js"
    src="finalprojectname/finalprojectname.nocache.js" (注意双重替换!)

  3. 在您的web.xml文件中,调整路径,如
    /mytestproject/greet to
    /finalprojectname/greet

其他任何东西(如重命名包,或重命名.gwt.xml文件)都是可选的。

如果您之后选择重命名.gwt.xml文件,则必须删除输出文件夹(war / finalprojectname)。 在Eclipse中,还要删除旧的“运行配置”,然后使用“运行方式> Web应用程序”创建一个新的“运行配置”。