My OS is Windows 10 and I use eclipse to write Java
I downloaded algs4.jar from the algorithm4 offical network, then used it as my project external jars, but when I try to run the program it keeps giving an error like this:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\hw\Downloads\algs4.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: TestAlgs4.class found in top-level directory (unnamed package not allowed in module)
I google the problem and tried to delete the TestAlgs4.class as the former error messages said but it did not work.
How can I fix this?
Federico klez Culloca
27.3k17 gold badges61 silver badges102 bronze badges
1 Answer 1
Problem solved. I was install alg4 in module path for my project,but it should install in classpath,now I can enjoy the book!
Sign up to request clarification or add additional context in comments.
Comments
lang-java
Caused by: java.lang.module.InvalidModuleDescriptorException:... (unnamed package not allowed in module)See stackoverflow.com/a/51133799/421195 for suggestions.