2

I already have OpenJDK installed on my machine: java - version at the CLI produces the following:

C:\java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)

(I suspect that openjdk 13 is the root problem, but since there is no apparent way to use a older JDK, such as 8, I am hoping that Eclipse and Google will run under the most current version of openjdk.)

I have a fresh install of Eclipse IDE for Enterprise Java Developers 2020-06 (4.16.0).

I immediately went to the Eclipse Marketplace and installed Google Cloud Tools for Eclipse 1.8.3. I waited several minutes for the installation to complete.

I then received a notification that Google Cloud SDK was needed and that installation would begin momentarily. I waited for this to complete.

To verify the installation, I created a new Google App Engine Standard java project, which generated a basic Hello World web page and corresponding servlet. I did not alter any code, configuration, or preferences.

I attempted to verify functionality by selecting DEBUG AS > APP ENGINE.

After a few seconds, an error dialog was displayed stating:

'Starting App Engine Standard at localhost' has encountered a problem. Server App Engine Standard at localhost failed to start.

Clicking the Details button provide the same information.

The following was displayed in the console pane:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/C:/Users/Jeff.Thurston/AppData/Local/google/ct4j-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/impl/appengine-local-runtime.jar) to method java.net.URL.getURLStreamHandler(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.RuntimeException: Unable to create a DevAppServer
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:369)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:301)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:383)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
Caused by: java.lang.ExceptionInInitializerError
    at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:124)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:354)
    ... 5 more
Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.<init>()
    at com.google.appengine.tools.development.DevSocketImplFactory.<clinit>(DevSocketImplFactory.java:76)
    ... 12 more
Caused by: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.<init>()
    at java.base/java.lang.Class.getConstructor0(Class.java:3350)
    at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2554)
    at com.google.appengine.tools.development.DevSocketImplFactory.<clinit>(DevSocketImplFactory.java:72)
    ... 12 more
Harif Velarde
  • 733
  • 5
  • 10

2 Answers2

0

I found this answer to a case similar to yours where it is recommended to migrate from java 8 to java 11 using this documentation, hope it helps.

Harif Velarde
  • 733
  • 5
  • 10
  • Although the user could choose to migrate the app to Java 11, but [App Engine Standard for Java 8](https://cloud.google.com/appengine/docs/standard/java) is still supported, – Brian de Alwis Aug 26 '20 at 18:55
0

The App Engine Standard development server only supports Java 8. You can download a Java 8 JRE (or JDK) from a number of places like AdoptOpenJDK.net, Azul's Zulu, or others.

After installing the Java 8 JRE, you'll then need to configure Eclipse to be able to use this JRE for launching the development server:

  1. Open Preferences > Java > Installed JREs. Choose Add or Search if your Java 8 VM is not found.
  2. Open Preferences > Java > Installed JREs > Execution Environments and select JavaSE-1.8, and ensure that your Java 8 VM is checked as the default VM.

You should then be able to relaunch your application, which should use the new JRE.

Brian de Alwis
  • 2,814
  • 2
  • 18
  • 32
  • This worked, however I had to do a bit of housekeeping to get there. I had a Java 13 and a Java 8 in addition to the AdoptOpenJDK. When I removed all but AdoptOpenJDK, everything started working. Thank you @brian for your kind assistance! – Jeff Thurston Aug 31 '20 at 14:03