我有一个简单的Google App Engine项目,该项目使用Java 8,并在GAE运行Java7时使用了一些以前受限制的类。
在maven(mvn appengine:devserver
)中运行开发服务器成功运行,并且正确加载了受限制的类。
但是,使用IntelliJ App Engine插件运行以运行该应用程序会导致以下旧错误:
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模式运行应用程序?
详细信息:
<runtime>java8</runtime>
。-Duse_jetty9_runtime=true -D--enable_all_permissions=true
答案 0 :(得分:1)
尽管IntelliJ和所有插件都是最新的,但我才意识到Google发布了一个新插件,用于通过IntelliJ管理Google Cloud。 由于该插件是全新的,因此不会自动更新/安装,因此需要手动安装。
安装新版本已解决了这些问题,并且开发人员运行正常。
安装
您可以转到IntelliJ->设置->浏览存储库,然后搜索“ Google Cloud Tools”,在Jetbrains插件存储库中找到我们的插件。
https://github.com/GoogleCloudPlatform/google-cloud-intellij#installation