EC

  • Edwin Chan
  • CV
  • CPSC 233
  • CPSC 331
  • CPSC 355
  • CPSC 581
  • Origami
  • Random

Tutorial 9 (March 15)

Problem importing javax.swing.JFrame?

Access restriction: The type JFrame is not accessible due to restriction on required library C:\Program Files\Java\jdk1.x.x_xx\jre\lib\rt.jar

If you are using a lab computer at school, and you're getting the above error, try this:

  1. In your project explorer, right-click your project folder and select Properties.
  2. Under Java Build Path, you will see the "Source/Projects/Libraries/Order and Export" tabs. Select the Libraries tab.
  3. Select and remove any existing entries in the list: something like this > JRE System Library [CDC-1.0/Foundation-1.0 (jre1.8.0_71)].
  4. Click the "Add Library..." button, select JRE System Library.
  5. In the new window, choose Execution environment.
  6. In the drop-down menu for Execution environment, select JavaSE-1.7(jre1.8.0_71).
  7. Click Finish
  • Edwin Chan
  • CV
  • CPSC 233
  • CPSC 331
  • CPSC 355
  • CPSC 581
  • Origami
  • Random