JFrame Restricted due to restriction on required library

java, swing

Solution

Try removing and readding the Java System Library to your project:

Project Properties -> Build Path -> Libraries -> Remove , and then Add Library -> JRE System Library

Try closing and reopening the Dialog after removing the the Library

Problem

I am making a new Java project in eclipse. The only problem is that I didn't even get five lines in before I got an error that reads: ``` Access Restriction: The type JFrame is not accessible due to restriction on required library C:\Program Files\Java\jre8\lib\rt.jar ``` How do I fix this issue? Please forgive me if someone already asked a similar question. I am still a beginner.

Original source

Related problems