[英]com.sun.javafx.collections in Java 9
I need to recompile java applicattion, written on Java 8. App use com.sun.javafx.collections.ObservableListWrapper
class, but when compiling for java 9 error occurs: 我需要重新编译java应用程序,在Java 8上编写。应用程序使用
com.sun.javafx.collections.ObservableListWrapper
类,但在编译java 9时出现错误:
Error:(3, 22) java: package com.sun.javafx.collections is not visible
(package com.sun.javafx.collections is declared in module javafx.base, which does not export it to the unnamed module)
Which class I can use instead of ObservableListWrapper
? 我可以使用哪个类而不是
ObservableListWrapper
? Or how to bypass this problem? 或者如何绕过这个问题?
Since Java9, most of the com.sun.*
APIs are unsupported , JDK-internal APIs and they might go away at any time. 从Java9开始,大多数
com.sun.*
API都不受支持 ,JDK内部API可能会随时消失。 Also as described in the noteworthy column - 另外如值得注意的专栏中所述 -
You should plan to move to using the javafx.collections.FXCollections
instead. 您应该计划转而使用
javafx.collections.FXCollections
。
Use exposed class since Java 8: ModifiableObservableListBase
. 从Java 8开始使用公开的类:
ModifiableObservableListBase
。
That should handle all your needs. 这应该可以满足您的所有需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.