As I understand modular side of things, if there is no module-info.java then it leverages details within the META-INF/MANIFEST.MF details.
I believe internally if nothing is set that it may do some internal module path handling similar to how with no package a class is set to the default package When module detail are available it does use the needs to reference the modules on the “module path”; otherwise it looks to the classpath. I’m taking a guess on the possibility that the Netbeans thread /JVM instance may be on a different as the running application and the test threat each with different classpath/modular paths in each context. In the case where they are the same thread then it may not be necessary but I’m guessing unless they share it, the need to specify the assorted path (unless system environment specified) in each context. Assume some of this may be similar in the build tools does things, where they have src for different contexts (I.e. runtime, source/compiler, and test context). In Eclipses I’ve seen the ability to set classpath, parameters, and VM parameters for regular runtime vs test vs debug instances. Maybe something for each applicable context may be needed. Eric Bresie [email protected] > On September 4, 2020 at 12:16:54 PM CDT, Laszlo Kishalmi > <[email protected]> wrote: > I'm trying to fix the error badges on JavaFX test code. > > Most of the imports giving "package is declared in unnamed module" > error. I came across with > https://github.com/BetterCloud/vault-java-driver which has the same > issue, though it's build script is more reasonable. The interesting > thing is, if I remove the module-info.java from the main sourceset > everything sets to be right. > > I've read halfway through > https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html > and it seems for testing these projects are reverting back from modular > java to classpath java (correct me if I'm wrong). > > As far as I've checked (placed a breakpoint in the code) I do not see > that NetBeans is requesting modulepath for the test code, still it > threats that code if it was modular. At least that's what I think. > > As we have some good folks here who are really into the compiler/java > business, I'd ask, how shall we handle such test sourcesets? > > Is it a bug in NetBeans that only if the main sourceset is modular, then > the whole project would be treated like that? > > So some guidance would be really appreciated. > > -- > > Laszlo Kishalmi > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > >
