Java 11 support?

Netlify bundles Java 8 (source) by default in the build image. I have a build tool that requires Java 11+. Generally, it seems Netlify supports customizing included tooling version, however, I have not been able to find any resources on customizing the version of Java the CI uses. How have folks change the version of Java from 8 to 11+?

The big hammer that would (probably) work would be to install java 11 at build init every single time the build runs. This would greatly slow down build time though. Other ideas?

Hey @kwill,

We’ve spoken about this as a team and one option you could try is to include the binary of your desired JVM version and include that in your repo. From there, you could reference the path to that binary to ensure you’re getting the right version for your build tool to run, while eliminating the necessity to install it from scratch every time.

That said, the ability to specify a particular Java version is an excellent idea – if you file a feature request on our build image GitHub repo, we might be able to include this in future versions of our build image :slight_smile:

Let us know if you have any other questions and we’d be happy to help!

Thanks for the suggestion @amelia. It sounds like it could work. We would like to avoid that solution for now since it will bloat our repo size until the end of time :weary:

I did go ahead and open a feature request issue on this one: Customizable Java version · Issue #788 · netlify/build-image · GitHub. Feel free to add anything you feel is missing :slightly_smiling_face:

1 Like

Hi Amelia

I wrote a brief summary of my findings for including extra Java versions in the build image on the GitHub issue.

If you (Netlify) are okay with the build image to grow, I might be able to provide a PR… would you be interested in that?

Hi @jacobemcken , Welcome to the forums! Our developers that look at the build image repo will respond on the open issue if they have further questions or information. Thank you so much for taking the time to share those details. We really appreciate it. (: