[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
開発環境の設定
Java 8 で開発するための環境を設定するには、次を行います。
Java 8 の最新リリースをインストールします。
サポートされているバージョンの一覧については Java 8 ランタイム環境をご覧ください。
Cloud SDK をインストールし、初期化します。すでに Cloud SDK のインストールと初期化が完了している場合は、gcloud components update
コマンドを実行して最新のリリースに更新します。
Cloud SDK には、アプリのデプロイと管理に使用できる gcloud
コマンドライン ツールが用意されています。
Cloud SDK for App Engine をダウンロードすることで、Cloud SDK for App Engine の使用を規定する利用規約の各条項に従うことに同意したとみなされます。
Cloud SDK をインストールし、初期化します。
Java 8 用の App Engine 拡張機能が含まれている gcloud コンポーネントをインストールします。
apt
または yum
のパッケージ マネージャーを使用して Cloud SDK をインストールした場合は、同じパッケージ マネージャーを使用して gcloud コンポーネントをインストールします。
それ以外の場合は、次のコマンドを使用します。
gcloud components install app-engine-java
GitHub のコード、サンプル、ライブラリ、ツールにアクセスするために、Git をインストールします。
Git をインストールします。
Java 8 ツールをインストールします。Maven または Gradle プラグインを使用して、Java 8 アプリをビルド、デプロイ、管理できます。
Java アプリを開発するための IDE またはエディタをインストールします。広く使用されているエディタには、次のようなものがあります。
これらのエディタには、構文のハイライト表示、インテリセンス、コード補完から完全な統合デバッグ機能まで、豊富な機能が用意されています(プラグインが必要になる場合もあります)。
Cloud Build に権限を付与する
アプリをデプロイするときに、App Engine は Cloud Build を使用してアプリをコンテナにビルドし、コンテナをランタイムにデプロイします。Cloud Build にはデフォルトでは Java 8 アプリをデプロイする権限がないため、プロジェクトにアプリをデプロイする権限を Cloud Build に付与する必要があります。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-01-02 UTC.