com.sun.awt.AWTUtilities, Eclipse gives a error
2015-07-09 10:00
579 查看
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 required library C:Program FilesJavajre6librt.jar
- Access restriction: The type AWTUtilities is not accessible due to restriction on required library C:Program FilesJavajre6librt.jar
You can fix it like this:
Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API ->
Forbidden reference -> change "error" to "warning"
Don't worry. It works。
- Access restriction: The method setWindowOpacity(Window, float) from the type AWTUtilities is not accessible due to restriction on required library C:Program FilesJavajre6librt.jar
- Access restriction: The type AWTUtilities is not accessible due to restriction on required library C:Program FilesJavajre6librt.jar
You can fix it like this:
Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API ->
Forbidden reference -> change "error" to "warning"
Don't worry. It works。
相关文章推荐
- Thread问题:解决 java.lang.IllegalThreadStateException: Thread already started. 错误
- java及mysql中文按拼音排序
- Java:单例模式的七种写法
- eclipse中出现的问题
- Java实现图片裁剪预览功能
- 【Eclipse错误】Syntax error, parameterized types are only available if source level is 1.5
- java反射机制
- URL,URI,URN之间的区别
- Java之美[从菜鸟到高手演变]之HashMap、HashTable
- 【eclipse】用Eclipse编程时,查看源代码,显示Source not found问题的解决方法。
- Spring定时任务的几种实现
- Eclipse 编辑注释模板
- Spring定时任务的几种实现
- Java中处理有效字符,截取小数无效字符
- java实现冒泡排序
- java中用到的基本排序
- Java集合的小抄 Java初学者必备
- java类的生命周期
- Eclipse在异常关闭后,启动闪退的解决办法(转)
- Java根据用户生日计算年龄