Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java AWT package "not accessible" in eclipse [duplicate]

Tags:

java

eclipse

When I try and import the AWT package in eclipse by doing "import java.awt.*;" at the beginning of my code it comes up with an error that "The package java.awt is not accessible." java.util seems to work fine, but the awt package doesn't. I'm not sure what I need to do to make it "accessible".

like image 492
EvilBob73 Avatar asked Sep 28 '19 20:09

EvilBob73


1 Answers

You can fix it by following the following steps:

Go to: Project -> Properties -> Libraries -> Add Library -> Execution Environment

Select the drop down list and then choose "javaSE-1.7"

That solved the problem for me!

like image 91
B97 Avatar answered Sep 23 '22 17:09

B97