why does changing “module -> rename to” attribute in .gwt.xml file give error

南楼画角 提交于 2019-12-10 10:21:34

问题


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)


回答1:


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.




回答2:


Everything can be changed. There will not be any problem if you change the project.

If you want to change/rename your entry point make sure that you are doing it at [modulename].gwt.xml also. Mostly few smarter IDE's will take care of this once you do rename.

Same way for module name changing you have to change it in host page. Nothing extra than that.



来源:https://stackoverflow.com/questions/8531137/why-does-changing-module-rename-to-attribute-in-gwt-xml-file-give-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!