1. 程式人生 > >Access restriction: The type 'Unsafe' is not API

Access restriction: The type 'Unsafe' is not API

war .net gmail forbidden window access compile acc ng-

錯誤:Access restriction: The type ‘Unsafe‘ is not API

Eclipse中有一種叫做存取限制的機制,來防止你錯誤使用那些非共享的API。通常來說,Eclipse做的是對的,因為兩點,我們不想要使用非共享API的,而且Eclipse知道什麽是共享的和非共享的API。但是有時我們想要使用非共享的API,比如說用gmail的來發送和接收郵件,要用到SSL。這個就是非共享的API。這時候我們就要更改一些設置了。
更改的步驟如下:
window-java-compiler-Error/Warning-Deprecated and Restricted API-Forbidden reference那裏,設置成Ignore即可。

參考連接:http://blog.csdn.net/mr_pang/article/details/47361923
---------------------
作者:u010286334
來源:CSDN
原文:https://blog.csdn.net/u010286334/article/details/62041325
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!

Access restriction: The type 'Unsafe' is not API