解决方法:

http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar

  1. Go to the Build Path settings in the project properties.
  2. Remove the JRE System Library
  3. 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.

 

相关文章:

  • 2021-08-11
  • 2022-12-23
  • 2021-09-18
  • 2021-05-20
  • 2022-12-23
  • 2021-07-11
  • 2021-04-30
  • 2021-08-18
猜你喜欢
  • 2021-06-24
  • 2021-06-03
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2021-06-16
相关资源
相似解决方案