The problem is that 'mvn clean install' fails inside visual studio code for the following reason 'Fatal error compiling: invalid target release: 11 .'
The error is clear enough. I have created an appropriate bat file to change my used jdk to 11, to match the version in my pom. This bat file does what it's supposed to do, which has allowed me to run 'mvn clean install' from the command prompt without errors.
The problem is that, inside vsc, from the powershell, after running my bat file, I get the following, when I enquire about the java version:
PS C:\Users\xxxx\programming\xxxxx\xxx-customer-project> java -version
java version "11.0.12" 2021-07-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode)
and 'mvn clean install' fails for the same, above reason. How can I also change those two pointers from v18.9?