Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JFrame Restricted due to restriction on required library [duplicate]

Tags:

java

swing

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.

like image 753
VeXeD_1357 Avatar asked Jul 06 '14 20:07

VeXeD_1357


1 Answers

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

like image 143
Simiil Avatar answered Oct 02 '22 06:10

Simiil