I am building a Java web app in netbeans 12.0 and tomcat 9.0. Running the project from netbeans works. However, when I attempt to clean and build it (which I need to do to deploy the app on another machine), the following error occurs:
error: option -Xbootclasspath/p: not allowed with target 14
BUILD FAILED (total time: 0 seconds)
I've also tested this with a blank project and the error occurs as long as there is a servlet in the project. I've also reset Netbeans' user dir.
The 14 in the error seems to correspond to openJDK 14, which everything is running on. I also happen to have JDK12 installed. Changing the project's java platform and source/binary version to 12 caused the above error but with 12 instead of 14.
How can I get netbeans to clean and build the project?