Module not found: rt
naabin opened this issue · 1 comments
I am having an issue running the tests. I am very new to this module system of the java and Gradle. I have the following error appears when I tried to run the test case for createCriminalCase method of SimpleServiceOpterationService.
`Testing started at 9:40 pm ...
This project is a Criminal Evidence Management System proof of concept application. It is meant to be used together with the "Pivotal Certified Professional Spring Developer Exam, 2nd Edition" published by Apress in order to learn and practice Spring 5.x.
Task :chapter00:dao:compileJava FAILED
/Users/nabin/Downloads/pivotal-certified-pro-spring-dev-exam-02/chapter00/dao/src/main/java/module-info.java:11: error: module not found: rt
requires rt;
^
1 error
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':chapter00:dao:compileJava'.
Compilation failed; see the compiler error output for details.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. - Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 8s`
Hello Naabin,
Please check your default JDK. The most recent version of this project builds with JDK 13 and Gradle 6.
Also please check the file pivotal-certified-pro-spring-dev-exam-02/chapter00/dao/src/main/java/module-info.java
and make sure you have no requires rt;
in it.
I rebuild the project before posting this message and the build passed. Whatever is happening is related to your local environment. I'm not sure I can help.
Good luck!