[英]Can't run GWT project
I have an error while running my project in IntelliJ IDEA: 在IntelliJ IDEA中运行项目时出现错误:
Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir, /home/dmitry/.IntelliJIdea14/system/gwt/LearnGWT.5e3e85a3/LearnGWT.8f93a286/run/www, -logLevel, INFO, MvpApp]
Super Dev Mode starting up
workDir: /tmp/gwt-codeserver-4584443402233015855.tmp
Loading Java files in MvpApp.
Finding entry point classes
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[WARN] Server class 'com.google.gwt.dev.shell.jetty.JDBCUnloader' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/home/dmitry/Disk/Ubuntu/gwt-2.7.0/gwt-dev.jar' to the web app classpath for this session
For additional info see: file:/home/dmitry/Disk/Ubuntu/gwt-2.7.0/doc/helpInfo/webAppClassPath.html
As you can see the log says almost nothing. 如您所见,日志几乎没有显示任何内容。
My source code could be found here: https://github.com/dvddmt/learn-gwt/tree/03_mvp_pattern 我的源代码可以在这里找到: https : //github.com/dvddmt/learn-gwt/tree/03_mvp_pattern
Could someone provide any help? 有人可以提供帮助吗?
I took a look at your project and got it running ( inside eclipse ) with a few changes. 我查看了您的项目,并进行了一些更改使其运行(在eclipse中)。
Move the MvpApp.gwt.xml
file into the mvpApp
package. 将MvpApp.gwt.xml
文件移动到mvpApp
包中。 You should have a structure like the following ( I picked random names, but you should get the idea ) : 您应该具有类似以下的结构(我选择了随机名称,但是您应该明白了):
com.module.package - client - server ( only if you have server code ) - shared - Module.gwt.xml
By default GWT will look for code inside the client
package. 默认情况下,GWT将在client
程序包中查找代码。 You are using a shared
package to presumably share code on the client and the server. 您正在使用shared
包来大概在客户端和服务器上共享代码。 To make that work you must add the following lines to your *.gwt.xml
file. 为此,您必须*.gwt.xml
添加到*.gwt.xml
文件中。
<!-- Specify the paths for translatable code --> <source path='client'/> <source path='shared'/>
In your example the full MvpApp.gwt.xml
file should be : 在您的示例中,完整的MvpApp.gwt.xml
文件应为:
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="MvpApp">
<inherits name='com.google.gwt.user.User'/>
<entry-point class='mvpApp.client.MvpApp'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.