如何在 Java 8 模式下 运行 IntelliJ 的 Google App Engine Dev Server 插件
How to run IntelliJ's Google App Engine Dev Server plugin in Java 8 mode
我有一个简单的 Google App Engine 项目,它使用 Java 8 并在 GAE 运行 [=46= 时使用了一些以前受限的 类 ]7.
运行 maven (mvn appengine:devserver
) 中的开发服务器成功运行,并且正确加载了受限 类。
但是,运行使用 IntelliJ 应用引擎插件 运行 应用程序会导致旧错误:
Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.
如何将插件配置为 运行 应用程序处于正确的 Java8 模式?
详情:
- Java 版本 = 1.8.0_151
- App Engine SDK 版本 - 1.9.64
- appengine-web.xml 已设置
<runtime>java8</runtime>
。
- IntelliJ 版本 2018.2.2
- VM 选项设置为
-Duse_jetty9_runtime=true -D--enable_all_permissions=true
由于此错误 https://github.com/sbt/sbt-appengine/issues/56
虽然 IntelliJ 和所有插件都是最新的,但我刚刚意识到 Google 发布了一个新插件,用于通过 IntelliJ 管理 Google Cloud。
因为插件是全新的,所以它没有自动获得 updated/installed,需要手动安装。
安装新版本已解决问题,dev runner 现在可以正常工作。
Installation
You can find our plugin in the Jetbrains plugin repository by going to IntelliJ -> Settings -> Browse Repositories, and search for 'Google Cloud Tools'.
https://github.com/GoogleCloudPlatform/google-cloud-intellij#installation
我有一个简单的 Google App Engine 项目,它使用 Java 8 并在 GAE 运行 [=46= 时使用了一些以前受限的 类 ]7.
运行 maven (mvn appengine:devserver
) 中的开发服务器成功运行,并且正确加载了受限 类。
但是,运行使用 IntelliJ 应用引擎插件 运行 应用程序会导致旧错误:
Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.
如何将插件配置为 运行 应用程序处于正确的 Java8 模式?
详情:
- Java 版本 = 1.8.0_151
- App Engine SDK 版本 - 1.9.64
- appengine-web.xml 已设置
<runtime>java8</runtime>
。 - IntelliJ 版本 2018.2.2
- VM 选项设置为
-Duse_jetty9_runtime=true -D--enable_all_permissions=true
由于此错误 https://github.com/sbt/sbt-appengine/issues/56
虽然 IntelliJ 和所有插件都是最新的,但我刚刚意识到 Google 发布了一个新插件,用于通过 IntelliJ 管理 Google Cloud。 因为插件是全新的,所以它没有自动获得 updated/installed,需要手动安装。
安装新版本已解决问题,dev runner 现在可以正常工作。
Installation
You can find our plugin in the Jetbrains plugin repository by going to IntelliJ -> Settings -> Browse Repositories, and search for 'Google Cloud Tools'.
https://github.com/GoogleCloudPlatform/google-cloud-intellij#installation