Java 如何启动 GWT 超级开发模式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18419919/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to launch GWT Super Dev Mode
提问by Suresh Atta
After a lot of pain,Finally installed GWT 2.5
with my Eclipse kepler
苦了好久,终于装上GWT 2.5
了我的Eclipse kepler
Now I am able to launch with Dev mode ,i.e Classic Dev Mode.
现在我可以使用开发模式启动,即 Classic Dev Mode.
By debug configuration in Eclipse aruguments tab is .
通过 Eclipse aruguments 选项卡中的调试配置是 .
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl index.html -logLevel INFO -codeServerPort 9997 -port 8888 -war E:\GWT2.5_Test\V4Workflow_V17\war com.suresh.V4Workflow
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl index.html -logLevel INFO -codeServerPort 9997 -port 8888 -war E:\GWT2.5_Test\V4Workflow_V17\war com.suresh.V4Workflow
When I'm debugging Eclipse generated the URL
当我调试 Eclipse 时生成了 URL
http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997
Which is fine.And Able to debug my code.
这很好。并且能够调试我的代码。
Actual question begins here:
实际问题从这里开始:
I am eagerly waiting to launch my application with Super Dev Mode.
我迫不及待地等待使用Super Dev Mode启动我的应用程序。
Super Dev Mode runs the GWT compiler in a web server, which is an ordinary Java application that developers can run from the command line. After the server starts up, it prints its URL:
The code server is ready. Next, visit:
http://localhost:9876/
Super Dev Mode 在 Web 服务器中运行 GWT 编译器,这是一个普通的 Java 应用程序,开发人员可以从命令行运行。服务器启动后,它会打印其 URL:
代码服务器已准备就绪。接下来,访问:
http://localhost:9876/
Added the below two lines in gwt.xml
file
在gwt.xml
文件中添加了以下两行
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
I compiled the project and then I launched with http://localhost:9876/
nothing to happened.
我编译了这个项目,然后我http://localhost:9876/
什么也没发生就启动了。
Strangely no configuration guidelines founded in docs.
奇怪的是没有在文档中建立配置指南。
What I'm missing here?
我在这里缺少什么?
Thanks for any clues.
感谢您提供任何线索。
回答by Gilles
Did you configure the second launcher ? If not :
您是否配置了第二个启动器?如果不 :
- Open the window
"Run configurations"
- Create a new launcher in
"Java Application"
- In the tab
"main"
:- add your project (
"browse"
) - add in Main Class :
"com.google.gwt.dev.codeserver.CodeServer"
- add your project (
- In tab
"argument"
:- add that
"-src src/ PACKAGE_NAME.PROJECTNAME"
(fictive example"-src src/ com.google.My_project"
)
- add that
- In tab
"classpath"
:- select
"User Entries"
, and add the jar"gwt-codeserver.jar"
- select
- Save this
Configuration
- 打开窗户
"Run configurations"
- 在中创建一个新的启动器
"Java Application"
- 在选项卡中
"main"
:- 添加您的项目 (
"browse"
) - 在主类中添加:
"com.google.gwt.dev.codeserver.CodeServer"
- 添加您的项目 (
- 在选项卡中
"argument"
:- 补充一下
"-src src/ PACKAGE_NAME.PROJECTNAME"
(虚构的例子"-src src/ com.google.My_project"
)
- 补充一下
- 在选项卡中
"classpath"
:- 选择
"User Entries"
,然后添加 jar"gwt-codeserver.jar"
- 选择
- 保存这个
Configuration
After that, you can launch your server then launch this 2nd launcher and access to the page : http://localhost:9876/
.
之后,您可以启动您的服务器,然后启动第二个启动器并访问该页面:http://localhost:9876/
。
source : http://www.badlogicgames.com/wordpress/?p=3073
来源:http: //www.badlogicgames.com/wordpress/?p=3073
Hope this will help you.
希望这会帮助你。