首页 > 编程语言 > 详细

JAVA中引用com.sun.awt.AWTUtilities时报错

时间:2014-06-11 10:47:41      阅读:718      评论:0      收藏:0      [点我收藏+]

JAVA中引用com.sun.awt.AWTUtilities时报错的解决办法[转]

在Eclipse中设置如下就可以了:

When using com.sun.awt.AWTUtilities, Eclipse gives a error:

 

- Access restriction: The method setWindowOpacity(Window, float) from the type AWTUtilities is not accessible due to restriction on requiredlibrary C:\Program Files\Java\jre6\lib\rt.jar
- Access restriction: The type AWTUtilities is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

 

You can fix it like this:

Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API ->

Forbidden reference -> change "error" to "warning"

JAVA中引用com.sun.awt.AWTUtilities时报错,布布扣,bubuko.com

JAVA中引用com.sun.awt.AWTUtilities时报错

原文:http://www.cnblogs.com/oneztec/p/3772956.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!