1

I have a project created with JDK 8 and NB 8.2, and I want to migrate this project to NB 11.1 with OpenJDK 11.

The environment is: NB 11.1 (fresh installation) on Windows 10 using OpenJDK 11.0.2.

I copied all the sources and libraries (.jars) into a new project NB 11 / OpenJDK 11 and solved the (few) problems from JDK 8 to OpenJDK 11, but when I built the project, I got this error:

error : option -Xbootclasspath/P: not allowed with target 11

I think this is a problem related to the Java version, so in the project's Properties panel, I changed the Source/Binary Format from JDK 11 to JDK 8, and everything worked!

But ... how can I solve this properly (with the Sources jdk 11 format)? I remember that in NB 8.2 I did the same with a project from JDK 7 to JDK 8.

skomisa
  • 16,436
  • 7
  • 61
  • 102
afterbit
  • 383
  • 7
  • 20

1 Answers1

1

This is a NetBeans bug. See NETBEANS-2452 -Xbootclasspath/p is no longer a supported option. Read the Comments tab under Activity for that bug report for some possible workarounds.

Also see this Stack Overflow question which is not an exact duplicate of your problem, but is close: error: option -Xbootclasspath/p: not allowed with target 12 (Netbeans 11.0)

skomisa
  • 16,436
  • 7
  • 61
  • 102