URLMapper.findFileObject(url) returns null when url points to module jar. For example this one
To reproduce unzip attached module, open in IDE and run it. Call main menu 'Help|URL Mapper Test' and you will see
output in console.
Product Version: NetBeans IDE Dev (Build 20080213082603)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Created attachment 56580 [details]
BTW, it might be somehow related to issue 126602.
No registered URLMapper for nbjcl protocol
Well, was it ever specified that you can access internal module data as FileObjects?
Most of such use cases do export the file in question through layerFS, which is specified to work correctly.
While it would be possible to either provide URLMapper implementation that would forward nbjcl: accesses to appropriate
JarFS, or to make the class loader provide (and serve for URL based requests) jar: URLs, I'd rather remove all such use
The reason is simple: jar-per-module is about the worst possible deployment formats for number of reasons. If we one day
get to implementing better format, we'd need to provide a special filesystem implementation that would allow processing
such (rare) requests.
My guess is that we do not want to support access to module JAR content as FileObjects. It really seems accidental
that it even worked. That is why I suggest a note about incompatible change in module system and wontfix. Jesse, do
you agree, will you do it?
Agreed, this is something we can probably do without. #e6d9babd282b
*** This issue has been marked as a duplicate of 129772 ***