0

After over a decade, I decided to blow the dust off my university dissertation and get it working again.

Oddly, NetBeans can't seem to find the libraries for javax.swing. Every single thing I imported for javax.swing can no longer be found with "cannot find symbol" for javax.swing.JFrame, javax.swing.JLabel etc.

I can't find where the library would be to import it!

Should I be using a different version of the JDK? Do I have to download javax from somewhere and include it?

enter image description here

JohnFF
  • 723
  • 5
  • 20
  • 1
    I'm stumped for an answer myself, but [this question](https://stackoverflow.com/questions/8298854/what-is-causing-this-java-cannot-find-symbol-error) seems to describe a similar problem. If you haven't already, I would try some of the solutions proposed over there. – Charlie Armstrong Jul 10 '20 at 23:57
  • 1
    Is it finding *any* JDK classes? You're online importing swing classes (without stars) so it's impossible to tell whether this is a problem with swing, or whether perhaps your JDK is not set up correctly. – tgdavies Jul 11 '20 at 00:54

1 Answers1

0

I managed to resolve this by downloading a different JDK (1.8, which I think contains JDK 8) from oracle. Works now. Maybe the other JDK I downloaded is too new, and there were changes to the packages, or maybe it didn't include all the packages. Either way, done now.

JohnFF
  • 723
  • 5
  • 20