728x90

 

1. 현상: 프로젝트 셋팅시 일어난 에러

Access restriction: The type BASE64Decoder is not accessible due to restriction on required library 

==> 로컬 이클립스 셋팅 문제.  소스상에 문제는 없음.

      (rt.jar에 있는 특정 클래스 직접 접근하려고 했을 경우 나는 에러)

 

2. 해결방법

2-1.

Window -> Preferences -> java -> Compiler -> Errors/Warnings 들어가서

Deprecated and restricted API 를 활성화 시켜서 Forbidden reference (access rules) 에 Error 로 체크되어 있는걸

Ignore로 바꿔주고 Apply 하면 된다.


 

2-2.


 1. 이클립스에서 Project - Properties에 들어가서 Java Build Path에 있는 Libraries 탭에서 JRE System Library를 remove한다.

2. Add Library를 클릭하여 JRE System Library를 다시 추가한다.

 

 

 

Reference

http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar/2174607#2174607

https://nota.tistory.com/7

http://myblog.opendocs.co.kr/archives/1566
https://devzeroty.tistory.com/entry/%EC%98%A4%EB%A5%98-The-type-BASE64Decoder-is-not-accessible-due-to-restriction-on-required-library

 

728x90

+ Recent posts