为什么要改变“模块 - >重命名为“ .gwt.xml文件中的属性给出错误 [英] why does changing "module -> rename to" attribute in .gwt.xml file give error

查看:160
本文介绍了为什么要改变“模块 - >重命名为“ .gwt.xml文件中的属性给出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过自己创建所有文件来创建并运行一个简单的GWT应用程序。它工作正常,我能够看到正确的显示。



我试着玩代码来增强我的知识。我注意到的是,一旦我将模块重命名为 testhistory 运行我的应用程序,它就可以正常工作。 然后,如果我将重命名为的值更改为 historytokentest ,则应用程序会给出错误无法在您的类路径中找到 testhistory.gwt.xml ';可能是拼写错误,或者您可能忘记为源代码包含类路径条目?



如果我将重命名为的值更改回 testhistory ,那么它再次正常工作。

任何人都可以清楚入口点类名 gwt.xml 文件名,模块重命名为的值是否有任何关系&安培;还有项目名称。他们可以在未来改变吗? (我知道这样做不好,但只是清除疑虑)

解决方案

如果您更改重命名-to ,它会更改输出文件的名称,因此您必须在您的HTML主机页面中更新< script> 标记(从 src =testhistory / testhistory.nocache.js src =historytokentest / historytokentest.nocache.js)。你不需要改变别的。


I am able to create and run a simple GWT application by creating all the files myself. It works fine and I am able to see the correct display.

I tried playing around the code to enhance my knowledge. What I noticed is that, once I run my app with say module rename to value "testhistory" it works fine.

But after that if I change rename to's value to say "historytokentest" the app gives errors like "Unable to find 'testhistory.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?"

If I change the rename to's value back to "testhistory" it again works fine.

Can anyone clear whether there is any relation between entryPoint class name, .gwt.xml file name, module rename to's value & also project name. Can they be changed in the future? (I know its not good to do so but just clearing doubts)

解决方案

If you change the rename-to, it'll change the name of the output files, so you have to update your <script> tag in your HTML host page (from src="testhistory/testhistory.nocache.js" to src="historytokentest/historytokentest.nocache.js"). You don't have to change anything else.

这篇关于为什么要改变“模块 - &gt;重命名为“ .gwt.xml文件中的属性给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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