How do I restart the Google App Engine Java Server in Eclipse?

后端 未结 7 659
一整个雨季
一整个雨季 2021-02-03 23:45

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 f

相关标签:
7条回答
  • 2021-02-04 00:11

    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.

    You need some version of the traditional "touch" unix command (if you work on windows you can download a version from here).

    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".

    "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.

    0 讨论(0)
  • 2021-02-04 00:15

    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)

    0 讨论(0)
  • 2021-02-04 00:17

    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.

    0 讨论(0)
  • 2021-02-04 00:17

    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.

    0 讨论(0)
  • 2021-02-04 00:17

    If you include the gwt SDK in your project, the gwt development mode box contains a reload server button that will work just fine.

    0 讨论(0)
  • 2021-02-04 00:18

    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.

    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.

    0 讨论(0)
提交回复
热议问题