Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 270094 - [JDK9] SPI to declare required module for ProjectClassPathProvider
[JDK9] SPI to declare required module for ProjectClassPathProvider
Product: java
Classification: Unclassified
Component: Project
PC Linux
: P2 (vote)
: Dev
Assigned To: apireviews
Depends on:
  Show dependency treegraph
Reported: 2017-03-16 14:53 UTC by Svata Dedic
Modified: 2017-03-23 02:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Proposed changes / SPI (54.50 KB, patch)
2017-03-16 14:57 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2017-03-16 14:53:46 UTC
Discovered during fixing form which does not find its GroupLayout in JDK9 environment - but:

if ProjectClassPathModifier.add{Libraries|Roots|AntArtifacts...} is called for Project which
1/ targets JDK 9 (sourcelevel == 9), and
2/ contains 
(= it is a regular module for JDK 9 runtime), the artifact or library is added to legacy classpath. It is therefore part of unnamed module, which is invisible to the modular project.

The attached patch introduces a SPI for ProjectClassPathModifier, which
- allows the project implementation to change the classpath type for adding artifacts
- allows the ProjectClassPathModifier to manipulate the

The default implementation is part of java project core, and allows project-specific provider to take over the default impl.
Comment 1 Svata Dedic 2017-03-16 14:57:28 UTC
Created attachment 163866 [details]
Proposed changes / SPI

Maven project was also adjusted, to allow extensible module path
Comment 2 Svata Dedic 2017-03-16 14:58:25 UTC
Please review the proposed SPI
Comment 3 Tomas Zezula 2017-03-16 15:08:45 UTC
Seems good to me.
Comment 4 Svata Dedic 2017-03-20 14:06:28 UTC
Implemented in jet-main#2de339ad9f28
Comment 5 Quality Engineering 2017-03-23 02:47:47 UTC
Integrated into 'main-silver', will be available in build *201703230002* on (upload may still be in progress)

User: Svata Dedic <>
Log: #270094: ProjectClassPathModifier can declare required directives in module-info

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo