ItZskyler
Posts: 17
Joined: Mon Oct 15, 2018 10:54 am

Swing GUI

Tue Oct 16, 2018 6:17 pm

i get this error in eclipse:

Code: Select all

- Access restriction: The constructor JFrame() is not accessible due to restriction on required library /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/
	 lib/rt.jar
	- Access restriction: The type JFrame is not accessible due to restriction on required library /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/rt.jar
	- Access restriction: The type JFrame is not accessible due to restriction on required library /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/rt.jar

DirkS
Posts: 9219
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Swing GUI

Tue Oct 16, 2018 6:22 pm

Ok.

ItZskyler
Posts: 17
Joined: Mon Oct 15, 2018 10:54 am

Re: Swing GUI

Tue Oct 16, 2018 6:47 pm

You know how to fix it?

ItZskyler
Posts: 17
Joined: Mon Oct 15, 2018 10:54 am

Re: Swing GUI

Tue Oct 16, 2018 7:09 pm

Uhm.. it works but it still gives an error

PhatFil
Posts: 509
Joined: Thu Apr 13, 2017 3:55 pm

Re: Swing GUI

Tue Oct 16, 2018 9:15 pm

on a pi? running raspbian? a sudo apt-get update and sudo apt-get upgrade should ensure that everything including java is all up to date, complete and current.

ItZskyler
Posts: 17
Joined: Mon Oct 15, 2018 10:54 am

Re: Swing GUI

Wed Oct 17, 2018 11:21 am

It says acces restriction again and i updated

User avatar
scruss
Posts: 1821
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Swing GUI

Wed Oct 17, 2018 3:21 pm

This seems more of an Eclipse problem than a Raspberry Pi one. Can you try going to the "Order and Export" tab in Eclipse and move JRE System Library to the bottom? This is suggested here: https://stackoverflow.com/questions/860 ... 29_2174607, found via a search for the top line of your error message ('Access restriction: The constructor JFrame() is not accessible due to restriction on required library /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/rt.jar')
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Return to “Java”