GWT,Eclipse 插件如何将项目与 .gwt.xml 文件一起重命名?尝试这样做时出错 [英] GWT, Eclipse Plugin how to rename project along with .gwt.xml file? Am getting error when try to do so

查看:20
本文介绍了GWT,Eclipse 插件如何将项目与 .gwt.xml 文件一起重命名?尝试这样做时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了一段时间对此进行了搜索,但没有发现任何与我的问题特别相关的内容.我正在进行 RPC 调用,因此我想更改我的一项网络服务的路径.

I've spent a while searching on this and nothing that I find seems relevant specifically to my issue. I am making RPC calls so I wanted to change the path to one of my web services.

它类似于 mytestproject 并想将其更改为 finalprojectname

It was something like mytestproject and wanted to change it to finalprojectname

我去了 mytestproject.gwt.xml 文件并更改

I went to the mytestproject.gwt.xml file and changed <module rename-to='mytestproject'> to <module rename-to='finalprojectname'>

然后我运行它并得到一个错误 [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt.xml' 在你的类路径上;可能是打字错误,或者您忘记包含源的类路径条目?

I then ran it through and got an error that [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 但仍然得到相同的结果.

I then changed mytestproject.gwt.xml to finalprojectname.gwt.xml but still got the same result.

我查看了所有可能的文件,但找不到为什么它认为该项目仍命名为 mytestproject.我已经清理并重建了项目等,但仍然相同.我对 Java 还是很陌生,所以也许我遗漏了一些明显的东西.如果有人可以提供任何建议,我将不胜感激.谢谢

I've looked through every possible file and can't find why it thinks the project is still named mytestproject. I have cleaned and rebuilt the project, etc but still the same. I am still fairly new to Java so maybe I am missing something obvious. I would greatly appreciate if anyone can offer any advice. Thanks

推荐答案

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

To rename a project from "mytestproject" to "finalprojectname":

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

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

In your .html file, change
src="mytestproject/mytestproject.nocache.js" to
src="finalprojectname/finalprojectname.nocache.js" (note the double replacement!)

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

In your web.xml file, adjust paths like
<url-pattern>/mytestproject/greet</url-pattern> to
<url-pattern>/finalprojectname/greet</url-pattern>

其他任何操作(例如重命名包或重命名 .gwt.xml 文件)都是可选的.

Anything else (like renaming packages, or renaming the .gwt.xml file) is optional.

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

If you do choose to rename your .gwt.xml file afterwards, then it's necessary to delete the output folder (war/finalprojectname). In Eclipse, also delete your old Run Configuration, and then create a new one by using "Run As > Web Application".

这篇关于GWT,Eclipse 插件如何将项目与 .gwt.xml 文件一起重命名?尝试这样做时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆