0

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?

Marc
  • 23
  • 1
  • 4
  • As a reminder, Java 14 has a 6 month lifespan. After that you'll need to upgrade to another version that has a 6 month lifespan. If this is school or learning then it's ok to play with a soon to be unsupported version and I'm afraid I don't know the answer. But if this is anything long term then use Java 11 as it is better supported and will be around for more than this year. – stdunbar Jun 26 '20 at 01:54
  • [1] Please [see this poster's answer to the suggested duplicate for a simple solution](https://stackoverflow.com/a/57292637/2985643) which worked for me with NetBeans 11.2 using JDK 13. The version numbers differ from yours, but the solution is the same. [2] Also see this unresolved bug report: [NETBEANS-2452 -Xbootclasspath/p is no longer a supported option](https://issues.apache.org/jira/browse/NETBEANS-2452) for more details. – skomisa Jun 26 '20 at 03:30

0 Answers0