Reputation: 283
I am on build 109 of JDK9 with the Jigsaw build.
I am trying a hello-world type of example just to get started with JDK9 modular development. When I launch the application, I am getting the following RuntimeException
(I am providing the java launcher command as well):
C:\JDK9Tryouts\HelloWorld1>java -modulepath mods -m hello.world1\hello.world1.HelloWorld1
Error occurred during initialization of VM
java.lang.module.ResolutionException: Module hello.world1\hello.world1.HelloWorl
d1 not found
at java.lang.module.Resolver.fail(java.base@9-ea/Resolver.java:796)
at java.lang.module.Resolver.resolveRequires(java.base@9-ea/Resolver.jav
a:94)
at java.lang.module.Configuration.resolveRequiresAndUses(java.base@9-ea/
Configuration.java:342)
at jdk.internal.module.ModuleBootstrap.boot(java.base@9-ea/ModuleBootstr
ap.java:217)
at java.lang.System.initPhase2(java.base@9-ea/System.java:1916)
As you can see I have set the -modulepath
to refer to the directory which contains user defined modules.
What should I target in order to debug this.
Upvotes: 4
Views: 5327
Reputation: 56
Looks like you have the wrong slash /
, I assume you want:
java -mp mods -m hello.world1/hello.world1.HelloWorld1
Upvotes: 2