Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

Google has deprecated the Java7 runtime in favour of Java8 as of the 13th of December 2017 and it's advisable to migrate your apps to the new runtime. The apps do not need to be migrated immediately since the Java7 runtime will be available until January 16 2019, so you have some time still.

I decided to migrate Guru JSON-RPS Tester and Extrudifier now to avoid any issues in the future. The process was very simple, however if your app is using some of the incompatible features of the Java7 runtime you may need to put in a bit more work. All of the incompatibilities are described on the Migrating from Java 7 to Java 8 Runtime page in Google's documentation.

This was the email I received from Google informing me of the changes...
gaejava8_6.png


I decided to head on over to the AppEngine Console to check that I was in fact on the Java7 runtime...I was.
gaejava8_1.png


So to move my app over to the Java8 runtime I had to update the WEB-INF/appengine-web.xml file and add this line to it - <runtime>java8</runtime>. I also updated my app's version at the same time just in case I had some incompatibility to iron out (I didn't want the current users of my app to have any down time).
gaejava8_7.png


That was almost too easy! I tried to redeploy and got a NullPointerException! Boo. It wasn't exactly clear why this exception was being thrown during deployment but I had a hunch...I was still using the Java7 JRE on my project's build path.
gaejava8_2.png




I've changed that to the Java8 JRE (via the Edit button)...
gaejava8_3.png

gaejava8_4.png


Now deploying the app was successful! I guess it's obvious that this should have been changed, but it wasn't in Google's documentation. My app now had a new version on the Java8 runtime. I was able to test it on its version-dot endpoint and after making sure it was running without issues I migrated all the traffic to the new version.
gaejava8_5.png


After the traffic was migrated, I deleted the Java7 version of my app.

-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.