Java 8 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Java 8 アプリケーションをデプロイできなくなります。既存の Java 8 アプリケーションは、
非推奨になる日付以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Java に移行することをおすすめします。
App Engine Java 8 ランタイムのよくある質問
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
App Engine Java 8 スタンダード ランタイムについてよく寄せられる質問を以下に示します。
Java 8 ランタイムで Kotlin を使用できますか?
はい。GitHub レポジトリにある Kotlin サンプルを確認してください。
はい。組み込みの Maven 統合を使用します。
また、IntelliJ Ultimate Edition も使用できます。Ultimate Edition には、より多くのウェブ アプリケーション開発機能が用意されており、App Engine 開発プロセスとの緊密な統合を実現します。
App Engine Cloud Endpoints v1.0 は Java 8 ランタイムで動作しますか?
いいえ。Cloud Endpoints Frameworks バージョン 2.0 に移行する必要があります。
再パッケージ化されたクラスで java.lang.NoClassDefFoundError が表示されるのはなぜですか?
com/google/appengine/repackaged/com/google/common/collect/ImmutableList
などの再パッケージ化された内部クラスは、以前のバージョンの App Engine API JAR で定義されていたとしても、Java 8 ランタイムではもう使用できません。
Java 8 アプリで再パッケージ化されたクラスを使用する必要がある場合は、appengine-web.xml
で appengine.api.legacy.repackaging
を true に設定します。例:
<system-properties>
<property name="appengine.api.legacy.repackaging" value="true">
</system-properties>
これらのクラスは、再パッケージ化されていないパブリック クラスに置き換えることをおすすめします。
Java 8 と Java 11 の間でトラフィック分割を実行できますか?
はい。サービス バージョンまたはモジュール バージョンのそれぞれで、異なるランタイム バージョンを使用でき、トラフィック分割がサポートされます。
インスタンスがリクエストを受け取っていないとき、Java 8 スレッドはどのように処理されますか?
App Engine API で作成されたスレッドは、引き続き以前と同様に動作します。
自動スケーリング |
手動スケーリング |
基本スケーリング |
インスタンスはリクエストがないために終了します。 |
インスタンスは最後のリクエストの後(デフォルト: 5 分)に終了します。 |
動作し続けます。 |
App Engine Java 8 ランタイムでは、次のメタデータ サーバー URL がサポートされます。
/computeMetadata/v1/project/numeric-project-id (pending)
/computeMetadata/v1/project/project-id
/computeMetadata/v1/instance/zone
/computeMetadata/v1/instance/service-accounts/default/aliases
/computeMetadata/v1/instance/service-accounts/default/email
/computeMetadata/v1/instance/service-accounts/default/scopes
/computeMetadata/v1/instance/service-accounts/default/token
/computeMetadata/v1/instance/service-accounts/{account}/aliases
/computeMetadata/v1/instance/service-accounts/{account}/email
/computeMetadata/v1/instance/service-accounts/{account}/scopes
/computeMetadata/v1/instance/service-accounts/{account}/token
メタデータ サーバー v1beta1
v1beta1 メタデータ サーバーはサポート終了となり、停止が予定されています。v1 以降を使用するようにすべてのリクエストを更新してください。詳細については、v1 メタデータ サーバー エンドポイントへの移行をご覧ください。
/computeMetadata/v1beta1/project/numeric-project-id (pending)
/computeMetadata/v1beta1/project/project-id
/computeMetadata/v1beta1/instance/zone
/computeMetadata/v1beta1/instance/service-accounts/default/aliases
/computeMetadata/v1beta1/instance/service-accounts/default/email
/computeMetadata/v1beta1/instance/service-accounts/default/scopes
/computeMetadata/v1beta1/instance/service-accounts/default/token
/computeMetadata/v1beta1/instance/service-accounts/{account}/aliases
/computeMetadata/v1beta1/instance/service-accounts/{account}/email
/computeMetadata/v1beta1/instance/service-accounts/{account}/scopes
/computeMetadata/v1beta1/instance/service-accounts/{account}/token
リクエストに応答がないのはなぜですか?
リクエストでスレッドプールを作成する場合は、現在のリクエストが終了する前に、そのスレッドを明示的にシャットダウンする必要があります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-04 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eKotlin is supported within the Java 8 runtime, and examples can be found in the provided GitHub repository.\u003c/p\u003e\n"],["\u003cp\u003eIntelliJ IDEA, both Community and Ultimate Editions, can be used with App Engine, with Ultimate Edition offering more advanced integration.\u003c/p\u003e\n"],["\u003cp\u003eCloud Endpoints v1.0 is not compatible with the Java 8 runtime; migration to Cloud Endpoints Frameworks version 2.0 is required.\u003c/p\u003e\n"],["\u003cp\u003eRepackaged classes are not available in Java 8 runtime unless \u003ccode\u003eappengine.api.legacy.repackaging\u003c/code\u003e is set to true in \u003ccode\u003eappengine-web.xml\u003c/code\u003e, but using public classes is the recommended approach.\u003c/p\u003e\n"],["\u003cp\u003eTraffic splitting is supported between different runtime versions, like Java 8 and Java 11, allowing each service or module version to utilize a different runtime.\u003c/p\u003e\n"]]],[],null,["# App Engine Java 8 Runtime FAQ\n\nThe following questions apply to the App Engine Java 8 standard runtime.\n\nCan I use Kotlin with the Java 8 runtime?\n-----------------------------------------\n\nYes, check out our [Kotlin samples](https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8) in the GitHub repository.\n\nCan I use IntelliJ IDEA Community Edition with App Engine?\n----------------------------------------------------------\n\nYes, using the built-in [Maven integration](/appengine/docs/legacy/standard/java/using-maven).\n\nYou can also use IntelliJ Ultimate Edition, which provides you with more web\napplication development features and has tighter integration with the\nApp Engine deployment process.\n\nDoes App Engine Cloud Endpoints v1.0 work in the Java 8 runtime?\n----------------------------------------------------------------\n\nNo. You must\n[migrate to Cloud Endpoints Frameworks version 2.0](/endpoints/docs/frameworks/legacy/v1/java/migrating).\n\nWhy do I get java.lang.NoClassDefFoundError for repackaged classes?\n-------------------------------------------------------------------\n\nRepackaged internal classes, such as\n`com/google/appengine/repackaged/com/google/common/collect/ImmutableList`,\nare not available anymore in the Java 8 runtime, even if they are defined in\nprevious versions of the App Engine API JAR.\n\nIf you need to use the repackaged classes in your Java 8 app, set\n`appengine.api.legacy.repackaging` to true in the `appengine-web.xml`. For\nexample: \n\n \u003csystem-properties\u003e\n \u003cproperty name=\"appengine.api.legacy.repackaging\" value=\"true\"\u003e\n \u003c/system-properties\u003e\n\nWe recommend that you replace these classes with the public, non-repackaged\nclasses.\n\nCan I do traffic splitting between Java 8 and Java 11?\n------------------------------------------------------\n\nYes, each service or module version can use a different runtime version, and\ntraffic splitting is supported.\n\nHow are Java 8 threads treated when an instance isn't getting requests?\n-----------------------------------------------------------------------\n\nThreads created with App Engine APIs will continue to work as before.\n\nWhat Metadata server features are supported in the App Engine Java 8 runtime?\n-----------------------------------------------------------------------------\n\nThe App Engine Java 8 runtime supports the following\n[Metadata server](/compute/docs/storing-retrieving-metadata) urls: \n\n /computeMetadata/v1/project/numeric-project-id (pending)\n /computeMetadata/v1/project/project-id\n /computeMetadata/v1/instance/zone\n /computeMetadata/v1/instance/service-accounts/default/aliases\n /computeMetadata/v1/instance/service-accounts/default/email\n /computeMetadata/v1/instance/service-accounts/default/scopes\n /computeMetadata/v1/instance/service-accounts/default/token\n /computeMetadata/v1/instance/service-accounts/{account}/aliases\n /computeMetadata/v1/instance/service-accounts/{account}/email\n /computeMetadata/v1/instance/service-accounts/{account}/scopes\n /computeMetadata/v1/instance/service-accounts/{account}/token\n\n**Metadata Server v1beta1**\n\nThe v1beta1 Metadata server is deprecated and scheduled for shutdown. Ensure\nthat you update all requests to use v1 or newer. For more information, see\n[Transitioning to the v1 metadata server endpoint](/compute/docs/storing-retrieving-metadata#transitioning). \n\n /computeMetadata/v1beta1/project/numeric-project-id (pending)\n /computeMetadata/v1beta1/project/project-id\n /computeMetadata/v1beta1/instance/zone\n /computeMetadata/v1beta1/instance/service-accounts/default/aliases\n /computeMetadata/v1beta1/instance/service-accounts/default/email\n /computeMetadata/v1beta1/instance/service-accounts/default/scopes\n /computeMetadata/v1beta1/instance/service-accounts/default/token\n /computeMetadata/v1beta1/instance/service-accounts/{account}/aliases\n /computeMetadata/v1beta1/instance/service-accounts/{account}/email\n /computeMetadata/v1beta1/instance/service-accounts/{account}/scopes\n /computeMetadata/v1beta1/instance/service-accounts/{account}/token\n\nWhy do my requests fail to respond?\n-----------------------------------\n\nIf you create a thread pool on a request, you must make sure that you explicitly\nshut it down before the current request terminates."]]