简体   繁体   中英

"Error occurred during initialization of boot layer" happened when I tried to add a external jar to the project in Eclispe

我正在学习算法第 4 版课程,尝试将教科书库“algs4”添加到项目中,但是在我添加文件后,它显示Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for /System/Volumes/Data/Users/jason/Desktop/Project/algs4.jar Caused by: java.lang.module.InvalidModuleDescriptorException: TestAlgs4.class found in top-level directory (unnamed package not allowed in module)

This happens because Java 9 introduced modules , and the algs4.jar has not been updated to support them. You either need to find or make a version of algs4.jar that does, or use Java 8 instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM