OK, maybe I'm dumb/blind, but in the docs it says "rebuild and restart the server." But I don't see a button to do this anywhere. Or from any contextual menu. And I can't find anything in their docs explaining how to do it. If I just try to start the app again, it gets angry because I already have App Engine running on the needed port.
好吧,也许我是愚蠢/盲目的,但在文档中它说“重建并重新启动服务器”。但我没有看到按钮在任何地方这样做。或者从任何上下文菜单。我在他们的文档中找不到任何解释如何操作的内容。如果我只是尝试再次启动应用程序,它会生气,因为我已经在所需的端口上运行了App Engine。
Only solution I've found is to restart Eclipse... any other ideas? A screenshot of a button would help if possible. :)
我发现只有解决方案才能重启Eclipse ...还有其他想法吗?如果可能的话,按钮的屏幕截图会有所帮助。 :)
7 个解决方案
#1
In eclipse, there is a view that contains your Console. If you click on that, you will see the STDOUT and STDERR output of your running application. In the upper right, there should be a red box that will terminate the currently running program.
在eclipse中,有一个包含您的控制台的视图。如果单击它,您将看到正在运行的应用程序的STDOUT和STDERR输出。在右上角,应该有一个红色框,将终止当前正在运行的程序。
#2
I have a different and possibly more productive solution for you. Like with most web development environments you probably want to change your source code and have Google Appengine server reload the new code for you.
我有一个不同的,可能更有效的解决方案。与大多数Web开发环境一样,您可能希望更改源代码并让Google Appengine服务器为您重新加载新代码。
You need some version of the traditional "touch" unix command (if you work on windows you can download a version from here).
你需要一些传统的“touch”unix命令版本(如果你在windows上工作,你可以从这里下载一个版本)。
Then go to you project properties, Builders and add a new build step as a "Program". Under "Location" enter the path to your "touch" command ("D:\bin\UnxUtils\usr\local\wbin\touch.exe" for example - on Posix systems just "touch" should be enough since it's already in your PATH) and in "Arguments" put something like "${project_loc}/war/WEB-INF/appengine-web.xml". Also go to the "Build Options" tab and check "During auto builds".
然后转到项目属性,构建器并添加新的构建步骤作为“程序”。在“位置”下输入“触摸”命令的路径(例如“D:\ bin \ UnxUtils \ usr \ local \ wbin \ touch.exe” - 在Posix系统上只需“触摸”即可,因为它已经在您的PATH)和“Arguments”中的内容类似于“$ {project_loc} /war/WEB-INF/appengine-web.xml”。还可以转到“构建选项”选项卡,然后选中“自动构建期间”。
"touch" will update the timestamp in you appengine-web.xml. When the App Engine server detects changes to you appengine-web.xml it will reload the app automatically. The load process is very fast so it can be done whenever you change any file in your project (which normally triggers the auto-build in Eclipse) - you can tweak the builder to only run when you change certain types of files.
“touch”将更新appengine-web.xml中的时间戳。当App Engine服务器检测到您对appengine-web.xml的更改时,它将自动重新加载应用程序。加载过程非常快,因此无论何时更改项目中的任何文件(通常在Eclipse中触发自动构建)都可以完成 - 您可以调整构建器以仅在更改某些类型的文件时运行。
#3
I might add that the "little red box" is not always visible. It drove me crazy reading that same instruction but not seeing the terminate button until I discovered that the Console windows has "layers" that you can select from using the drop-down button on the far right of the controls for the Console view. You just need to go "back" to the console screen that says the server is running and you will see the little red terminate button.
我可能会补充说,“小红框”并不总是可见的。它驱使我疯狂阅读相同的指令,但没有看到终止按钮,直到我发现控制台窗口有“层”,您可以使用控制台视图控件最右侧的下拉按钮进行选择。您只需要“返回”控制台屏幕,该屏幕显示服务器正在运行,您将看到小红色终止按钮。
#4
The previous answer wasn't cutting the cheese for me. Upon first starting App Engine, the red square would be available above the text entry area. If I then clicked the run button again, then red square would go away and the console for the previous launch would be replaced by the console for the new launch. To manually stop the App Engine server, you can kill it from the terminal: http://geekbrigade.wordpress.com/2009/02/26/how-to-find-and-kill-a-process-that-is-using-a-particular-port-in-ubuntu/ In short, "sudo netstat -lpn |grep :8888" and kill the service by process ID.
之前的答案并不是为我切割奶酪。首次启动App Engine时,红色方块将在文本输入区域上方可用。如果我再次单击运行按钮,则红色方块将消失,之前启动的控制台将被新启动的控制台替换。要手动停止App Engine服务器,您可以从终端终止它:http://geekbrigade.wordpress.com/2009/02/26/how-to-find-and-kill-a-process-that-is-使用-a-specific-port-in-ubuntu /简而言之,“sudo netstat -lpn | grep:8888”并按进程ID终止服务。
Strangely, adding Google Web Toolkit to the project made my App Engine launch show up in the Development Mode pane, where it could be easily be killed or restarted.
奇怪的是,将Google Web Toolkit添加到项目中使我的App Engine启动显示在“开发模式”窗格中,可以轻松地将其杀死或重新启动。
#5
Just Click on Debug perspective (should be on upper right panel), select the instance of web application on Debug panel (if you don't show it, you could enable by menu Window->show view->Debug) and click on red box of view menu.
只需单击Debug透视图(应位于右上方面板),在Debug面板上选择Web应用程序实例(如果没有显示,可以通过菜单Window-> show view-> Debug启用)并单击红色盒子的视图菜单。
#6
The best I've found is to setup the keyboard shortcuts for the console's terminate button, and the run/debug start/restart command. By default, you can enable Command-F2 to terminate, and Command-F11 to restart, its fairly painless. Make sure to enable the full debug menu group (click on main toolbar -> customize, etc)
我发现最好的是设置控制台终止按钮的键盘快捷键,以及run / debug start / restart命令。默认情况下,您可以启用Command-F2终止,而Command-F11重启,它相当轻松。确保启用完整的调试菜单组(单击主工具栏 - >自定义等)
#7
If you include the gwt SDK in your project, the gwt development mode box contains a reload server button that will work just fine.
如果在项目中包含gwt SDK,gwt开发模式框包含一个可以正常工作的重新加载服务器按钮。
#1
In eclipse, there is a view that contains your Console. If you click on that, you will see the STDOUT and STDERR output of your running application. In the upper right, there should be a red box that will terminate the currently running program.
在eclipse中,有一个包含您的控制台的视图。如果单击它,您将看到正在运行的应用程序的STDOUT和STDERR输出。在右上角,应该有一个红色框,将终止当前正在运行的程序。
#2
I have a different and possibly more productive solution for you. Like with most web development environments you probably want to change your source code and have Google Appengine server reload the new code for you.
我有一个不同的,可能更有效的解决方案。与大多数Web开发环境一样,您可能希望更改源代码并让Google Appengine服务器为您重新加载新代码。
You need some version of the traditional "touch" unix command (if you work on windows you can download a version from here).
你需要一些传统的“touch”unix命令版本(如果你在windows上工作,你可以从这里下载一个版本)。
Then go to you project properties, Builders and add a new build step as a "Program". Under "Location" enter the path to your "touch" command ("D:\bin\UnxUtils\usr\local\wbin\touch.exe" for example - on Posix systems just "touch" should be enough since it's already in your PATH) and in "Arguments" put something like "${project_loc}/war/WEB-INF/appengine-web.xml". Also go to the "Build Options" tab and check "During auto builds".
然后转到项目属性,构建器并添加新的构建步骤作为“程序”。在“位置”下输入“触摸”命令的路径(例如“D:\ bin \ UnxUtils \ usr \ local \ wbin \ touch.exe” - 在Posix系统上只需“触摸”即可,因为它已经在您的PATH)和“Arguments”中的内容类似于“$ {project_loc} /war/WEB-INF/appengine-web.xml”。还可以转到“构建选项”选项卡,然后选中“自动构建期间”。
"touch" will update the timestamp in you appengine-web.xml. When the App Engine server detects changes to you appengine-web.xml it will reload the app automatically. The load process is very fast so it can be done whenever you change any file in your project (which normally triggers the auto-build in Eclipse) - you can tweak the builder to only run when you change certain types of files.
“touch”将更新appengine-web.xml中的时间戳。当App Engine服务器检测到您对appengine-web.xml的更改时,它将自动重新加载应用程序。加载过程非常快,因此无论何时更改项目中的任何文件(通常在Eclipse中触发自动构建)都可以完成 - 您可以调整构建器以仅在更改某些类型的文件时运行。
#3
I might add that the "little red box" is not always visible. It drove me crazy reading that same instruction but not seeing the terminate button until I discovered that the Console windows has "layers" that you can select from using the drop-down button on the far right of the controls for the Console view. You just need to go "back" to the console screen that says the server is running and you will see the little red terminate button.
我可能会补充说,“小红框”并不总是可见的。它驱使我疯狂阅读相同的指令,但没有看到终止按钮,直到我发现控制台窗口有“层”,您可以使用控制台视图控件最右侧的下拉按钮进行选择。您只需要“返回”控制台屏幕,该屏幕显示服务器正在运行,您将看到小红色终止按钮。
#4
The previous answer wasn't cutting the cheese for me. Upon first starting App Engine, the red square would be available above the text entry area. If I then clicked the run button again, then red square would go away and the console for the previous launch would be replaced by the console for the new launch. To manually stop the App Engine server, you can kill it from the terminal: http://geekbrigade.wordpress.com/2009/02/26/how-to-find-and-kill-a-process-that-is-using-a-particular-port-in-ubuntu/ In short, "sudo netstat -lpn |grep :8888" and kill the service by process ID.
之前的答案并不是为我切割奶酪。首次启动App Engine时,红色方块将在文本输入区域上方可用。如果我再次单击运行按钮,则红色方块将消失,之前启动的控制台将被新启动的控制台替换。要手动停止App Engine服务器,您可以从终端终止它:http://geekbrigade.wordpress.com/2009/02/26/how-to-find-and-kill-a-process-that-is-使用-a-specific-port-in-ubuntu /简而言之,“sudo netstat -lpn | grep:8888”并按进程ID终止服务。
Strangely, adding Google Web Toolkit to the project made my App Engine launch show up in the Development Mode pane, where it could be easily be killed or restarted.
奇怪的是,将Google Web Toolkit添加到项目中使我的App Engine启动显示在“开发模式”窗格中,可以轻松地将其杀死或重新启动。
#5
Just Click on Debug perspective (should be on upper right panel), select the instance of web application on Debug panel (if you don't show it, you could enable by menu Window->show view->Debug) and click on red box of view menu.
只需单击Debug透视图(应位于右上方面板),在Debug面板上选择Web应用程序实例(如果没有显示,可以通过菜单Window-> show view-> Debug启用)并单击红色盒子的视图菜单。
#6
The best I've found is to setup the keyboard shortcuts for the console's terminate button, and the run/debug start/restart command. By default, you can enable Command-F2 to terminate, and Command-F11 to restart, its fairly painless. Make sure to enable the full debug menu group (click on main toolbar -> customize, etc)
我发现最好的是设置控制台终止按钮的键盘快捷键,以及run / debug start / restart命令。默认情况下,您可以启用Command-F2终止,而Command-F11重启,它相当轻松。确保启用完整的调试菜单组(单击主工具栏 - >自定义等)
#7
If you include the gwt SDK in your project, the gwt development mode box contains a reload server button that will work just fine.
如果在项目中包含gwt SDK,gwt开发模式框包含一个可以正常工作的重新加载服务器按钮。