私の歴史と今

振り返ると恥ずかしくなるのが私の歴史。だけどそのときは真面目に書いていた訳でね。そんな今の私を書いていく。

Google App Engineを利用するまでのメモ(2)

前日のGoogle App Engineを利用するまでのメモ(1)に引き続き、翻訳しながら進めてみる。

Using Eclipse and the Google Plugin for Eclipse

If you are using the Eclipse development environment, the easiest way to develop, test and upload App Engine apps is to use the Google Plugin for Eclipse. The plugin includes everything you need to build, test and deploy your app, entirely within Eclipse.

もし、Eclipseを使用しているのであれば、Google App Engineアプリを最も簡単に開発・テスト・アップロードする方法は、Googleプラグインを使うことです。そのプラグインは、アプリをビルド・テスト・開発するためのすべての機能を有している。
→ それは便利だ。

The plugin is available for Eclipse versions 3.3 and 3.4. You can install the plugin using the Software Update feature of Eclipse. The installation locations are as follows:

Googleプラグインは、Eclipse3.3と3.4に対応しており、Eclipseの「ソフトウェアの更新」を使用してインストールできる。更新時に指定するURLは、次のようになる。

→私の環境は3.4だと。

For details on how to use Software Update to install the plugin, and how to create a new project, see Using the Google Eclipse Plugin.

「ソフトウェアの更新」でGoogleプラグインをインストールする方法と、新しいプロジェクトを作成する方法の詳細はこちらを参照してください。
→ OK! 早速インストールだ!






ここからが長い・・・。待っている間に次へ行こう。と思ったら終わった。

う、なぜか何も表示されていない。そういうものなのか? でもサイズ55,922KBって書いてあるから大丈夫なのかな。

いろんなプラグインも必要みたい。


完了!

Getting the SDK

If you are using Eclipse and the Google Plugin, you can install the App Engine SDK from Eclipse using Software Update. If you haven't already, install the "Google App Engine Java SDK" component using the locations above.

もしEclipseGoogleプラグインを使用しているのであれば、Eclipseの「ソフトウェアの更新」を使用してGoogle App Engine SDKをインストールできる。まだであれば、Googleプラグインと同様のURLから"Google App Engine Java SDK"をインストールする。
→ う、よく読んだら、さっきの更新の時はGoogleプラグインだけだったのね。で、今回はGoogle App Engine SDKのインストールの話か。同時にインストールしてしまった。でも特に問題ないようだ。

If you are not using Eclipse or the Google Plugin, you can download the App Engine Java SDK as a Zip archive.

もしEclipseGoogleプラグインを使用していないのであれば、Google App Engine Java SDKをZip形式でダウンロードできる。
Eclipseがなくても大丈夫ってことね。

Download the App Engine Java SDK. Unpack the archive in a convenient location on your hard drive.

ダウンロードし、都合のいい場所に解凍してください。
Eclipse使ってるから、これはスルーなんだけど、ダウンロードページにはWindows用の「GoogleAppEngine_1.1.0.msi」が用意されていた。

Note: Unpacking the archive creates a directory whose name is something like appengine-java-sdk-X.X.X, where X.X.X is the SDK version number. Throughout this documentation, this directory will be referred to as appengine-java-sdk/. You may want to rename the directory after unpacking.

メモ:Zipを解凍すると「appengine-java-sdk-X.X.X」というような名前のディレクトリが作成される。「X.X.X」はSDKのバージョンをあらわしている。このドキュメントでは、そのディレクトリを「appengine-java-sdk/」と表記する。解凍後、そのディレクトリ名は、変更してもよい。
→ ふむ。これもEclipseを使用する人にとっては関係ないようだけど、「google_appengine_1.1.0.zip」を解凍してできたディレクトリ名は「google_appengine」だった。SDKのバージョンが付与されているのはZipファイルであって、解凍後のディレクトリではなかった。

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.

Google App Engine Java SDKには、いくつかのデモアプリが用意されていて、demosディレクトリに格納されている。このチュートリアルで作成する最新バージョンの「guest book」アプリは、guestbookディレクトリに格納されている。このデモはすでにコンパイルされているのですぐに実行できる。
→ ぬ。これって「google_appengine_1.1.0.zip」に含まれているものか? Eclipseでインストールした場合は、どこにあるんだ?
ここにあった。「\plugins\com.google.appengine.eclipse.sdkbundle_1.2.0.v200904062334\appengine-java-sdk-1.2.0\demos」

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.

もしEclipseを使用している場合は、Eclipseインストールディレクトリの「plugins/com.google.appengine.eclipse.sdkbundle_VERSION」ディレクトリに格納されている。「VERSION」はSDKのバージョンをあらわす。
→ なんだ、Eclipseの場合も説明してあるじゃん。ちなみにVERSIONは「1.2.0.v200904062334」でした。
しかし、Zipファイルの中には「guest book」しかデモがなかったんだけど、Eclipseの方には以下の8つのデモが存在していた。Eclipseの方がお得?

    • guestbook
    • helloorm
    • jdoexamples
    • mandelbrot
    • new_project_template
    • shardedcounter
    • sticky
    • taskengine

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

コマンドラインから、カレントディレクトリを上記のディレクトリに移動する。もしMac OS XLinuxを使用している場合は、実行する前にファイルの実行権限を付与しておく必要がある(たとえばchmod u+x dev_appserver.sh)
→ OK。私はWindowsだ。簡単簡単。

If you are using Windows, start the guest book demo in the development server by running the following command at a command prompt:
appengine-java-sdk\bin\dev_appserver.cmd appengine-java-sdk\demos\guestbook\war

Windowsの場合、次のようなコマンドを実行すれば、「guest book」のデモを開発用サーバで開始できる。
→ 私の環境では次のようになる。(バージョンの部分だけ異なる)

C:\Users\ken\application\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.2.0.v200904062334>
appengine-java-sdk-1.2.0\bin\dev_appserver.cmd appengine-java-sdk-1.2.0\demos\guestbook\war
The server is running at http://localhost:8080/

実行すると、サーバが起動する。

C:\Users\ken\application\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.2.0.v200904062334>
appengine-java-sdk-1.2.0\bin\dev_appserver.cmd appengine-java-sdk-1.2.0\demos\guestbook\war
The server is running at http://localhost:8080/

If you are using Mac OS X or Linux, run the following command:

Mac OS XLinuxの場合は次のようなコマンドになる。>>
./appengine-java-sdk/bin/dev_appserver.sh appengine-java-sdk/demos/guestbook/war