Solution to: "Unbound classpath container: JRE System Library [JavaSE-11] in project" in VSCode

I’m working on Java / VS Code project and was getting this error:

"Unbound classpath container: 'JRE System Library [JavaSE-11]' in project"

I’m new to Java and pom.xml files, so it took me a while to figure this out. Ultimately, I used the VS Code Maven extension to generate a new Maven project with the maven-archetype-quickstart template to see what a proper pom.xml file looks like and it generated this:

You should be able to copy the properties and build sections to your project to resolve the above issue. LMK if it works for you.

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="" xmlns:xsi=""


  <!-- FIXME change it to the project's website -->




    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
        <!-- clean lifecycle, see -->
        <!-- default lifecycle, jar packaging: see -->
        <!-- site lifecycle, see -->