I have a simple Google App Engine project that uses Java 8 and makes use of some of the previously restricted classes when GAE ran Java7.
Running the development server in maven (mvn appengine:devserver
) works successfully and the restricted classes are loaded correctly.
However, running using the IntelliJ app engine plugin to run the application causes the old error of:
Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.
How should the plugin be configured to run the application in the correct Java8 Mode?
Details:
<runtime>java8</runtime>
set.-Duse_jetty9_runtime=true -D--enable_all_permissions=true
due to this error https://github.com/sbt/sbt-appengine/issues/56Although IntelliJ and all plugins were up to date, I just realised that Google released a new plugin for managing Google Cloud through IntelliJ. Because the plugin is completely new it didn't get updated/installed automatically and it needs to be installed manually.
Installing the new version has resolved the issues, and the dev runner is now working correctly.
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