Access restriction on class due to restriction on required library rt.jar?

前端 未结 15 1735
忘掉有多难
忘掉有多难 2020-11-22 01:09

I\'m attempting to compile Java 1.4 code that was created by IBM\'s WSDL2Java on Java5 without recreating

相关标签:
15条回答
  • 2020-11-22 01:20

    I met the same problem. I found the answer in the website:http://www.17ext.com.
    First,delete the JRE System Libraries. Then,import JRE System Libraries again.

    I don't know why.However it fixed my problem,hope it can help you.

    0 讨论(0)
  • 2020-11-22 01:22
    • Go to the Build Path settings in the project properties. Windows -> Preferences -> Java Compiler
    • Remove the JRE System Library
    • Add another JRE with a "perfect match"
    • clean and build your project again. It worked for me.
    0 讨论(0)
  • 2020-11-22 01:22

    I just had this problem too. Apparently I had set the JRE to 1.5 instead of 1.6 in my build path.

    0 讨论(0)
  • 2020-11-22 01:26

    In my case there was a mismatch between the build path JRE and installed JRE on execution environment. I moved into Project > Properties > Java compiler. There was a warning message at the bottom.

    I clicked on the links 'Installed JRE', 'Execution environment', 'Java build path' and changed the JDK version to 1.7 and the warning disappeared.

    0 讨论(0)
  • 2020-11-22 01:26

    Adding a right JRE System through build path is the solution but your eclipse still may have the error. To solve that go to Java Build path --> Order and Export and move your JRE system library on the top. This has solved my problem.

    0 讨论(0)
  • 2020-11-22 01:27

    Just change the order of build path libraries of your project. Right click on project>Build Path> Configure Build Path>Select Order and Export(Tab)>Change the order of the entries. I hope moving the "JRE System library" to the bottom will work. It worked so for me. Easy and simple....!!!

    0 讨论(0)
提交回复
热议问题