Access restriction: The type XXX is not accessible due to restriction on required library
There's another solution that also works. I found it on this forum:
- Go to the Build Path settings in the project properties.
- Remove the JRE System Library
- Add it back; Select "Add Library" and select the JRE System Library. The default worked for me.
This works because you have multiple classes in different jar files. Removing and re-adding the jre lib will make the right classes be first. If you want a fundamental solution make sure you exclude the jar files with the same classes.
本文提供了解决方案来解决访问限制问题,即无法访问特定库类型的情况。通过调整项目属性设置,移除并重新添加JRE系统库,确保了不同jar文件中的正确类加载顺序。此方法尤其适用于包含多个类的复杂项目,确保了资源的有效访问。
1898

被折叠的 条评论
为什么被折叠?



