0

In NetBeans 11.0 I created Modular project, which uses external modules and libraries. If I copy all external modules and libraries on module path, application works fine, but if I set module path for modules and add regular libraries on Classpath, my application isn't able to use them.

Is this mean that I need to put all my external libraries (no matter if they are modules or standard libraries) on module path?

John
  • 49
  • 1
  • 9

1 Answers1

0

Yes. A modular application’s runtime effectively ignores the classpath. This is because the everything in the classpath belongs to the unnamed module, which named modules cannot access.

This is described in detail by Is it possible to mix --class-path and --module-path in javac (JDK 9)?.

In Eclipse, what is the difference between modulepath and classpath? also contains some useful information about this.

VGR
  • 40,506
  • 4
  • 48
  • 63