英文水平比较次,刚开始看java方面的文档,感觉这段比较有用,以自己的理解,翻译了一下。呵呵。错误之处欢迎大家指出
Trying a Demo Application
The App Engine Java SDK includes several demo applications in the demos/ directory. The final version of the guest book application you will create in this tutorial is included under the directory guestbook/. This demo has been precompiled for you so you can try it right away.
大意:The App Engine Java SDK在目录demos下,包含了一些示例程序,下面将指导创建guestbook应用,这个应用已经是被预编译过的,所以你能够很轻松地去尝试下这个应用。
If you are using Eclipse, the SDK is located in your Eclipse installation directory, under plugins/com.google.appengine.eclipse.sdkbundle_VERSION/, where VERSION is a version identifier for the SDK. From the command line, change the current working directory to this directory to run the following command. If you're using Mac OS X or Linux, you may need to give the command files executable permissions before you can run them (such as with the command chmod u+x dev_appserver.sh).
大意:如果你使用的是Eclipse,那么SDK已经在你的Eclipse安装目录里,路径为:plugins/com.google.appengine.eclipse.sdkbundle_VERSION/,这个VERSON是版本号,这个版本号是SDK的版本ID。在命令行模式下,将使用这个目录作为当前工作目录。然后执行以下命令。如果你使用的是Mac OX X 或 Linux,在你运行这些命令前,你可能需要赋予这些命令文件可执行的权限(例如使用命令 chmod u+x dev_appserver.sh)
If you are using Windows, start the guest book demo in the development server by running the following command at a command prompt:
大意:如果你使用的是Windows,通过以下命令开始尝试guest book示例:
appengine-java-sdk/bin/dev_appserver.cmd appengine-java-sdk/demos/guestbook/war
(这里自己注意下相对路径的问题,我是直接进入bin目录,然后执行:
dev_appserver.cmd ../demos/guestbook/war)
If you are using Mac OS X or Linux, run the following command:
大意:如果你使用Mac OS X 或 Linux ,使用如下命令:
./appengine-java-sdk/bin/dev_appserver.sh appengine-java-sdk/demos/guestbook/war
The development server starts, and listens for requests on port 8080. Visit the following URL in your browser:
大意:服务器启动,并监听8080发来的请求,可以在浏览器中使用如下的url访问:http://localhost:8080/
To stop the server, make sure the command prompt window is active, then press Control-C.
大意:在确保你的命令窗口是活动区域时,使用CTRL+C,可以停止服务。