Eclipse对jfxrt.jar类的访问限制发出警告 [英] Eclipse gives warning on access restriction for jfxrt.jar classes
问题描述
我正在使用eclipse kepler和java SE 1.8 jdk系统库但是当我使用任何javafx类或方法时,eclipse会发出一个警告,例如访问限制:类型'TableColumn<?,?>'不是API(对所需库'C:\Program Files \ Java \ _jdk1.8.0_05 \ jre \ lib \ ecxt \ jfxrt.jar'的限制)
。
I'm using eclipse kepler with java SE 1.8 jdk system library but when I use any javafx classes or methods eclipse gives a warning like Access restriction: The type 'TableColumn<?,?>' is not API (restriction on required library 'C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar')
.
我尝试向系统库添加访问规则,以允许使用通配符 * $ c $访问库中的所有jar c>但警告仍在那里。我也使用maven建设项目。
代码有效,但警告是唠叨,并且在我编码时影响可读性。感谢任何帮助。
I have tried adding an access rule to the system library to allow access for all jars in the library using the wildcard *
but the warning is still there. Am also using maven for building project.
The code works but the warning is nagging and is affecting readability as I code. Any help is appreciated.
编辑:我还尝试在开头添加 @SuppressWarnings(restriction)
我的课程,但这仍然无法解决未知原因并隐藏我可能需要看到的所有其他限制警告
I also tried adding @SuppressWarnings("restriction")
at the beginning of my classes but this still doesn't solve the unknown cause and hides all other restriction warnings that I may need to see
推荐答案
你可以在以下设置中选择忽略
:
You can choose ignore
in the following settings:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
(Project) Properties -> Java Compiler -> Errors/Warnings
使用过滤器查找禁止参考
禁止参考(访问规则)
:将其更改为 ignore
这篇关于Eclipse对jfxrt.jar类的访问限制发出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!