Eclipse 编译java程序出现 Access restriction错误

今天在运行编译Cling时,产生的代码出错 
并且提示Access restriction

 Eclipse 编译java程序出现 Access restriction错误_第1张图片

查帮助发现 
在preference->java->complier->errors/warning->deprecated and restricted API

把 Forbidden reference 的Error改成warning 即可

你可能感兴趣的:(Eclipse 编译java程序出现 Access restriction错误)