Com.sun.javafx.collections in Java 9

I need to recompile a java application written in Java 8. The application uses the class com.sun.javafx.collections.ObservableListWrapper, but an error occurs when compiling for 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 can I use instead ObservableListWrapper? Or how to get around this problem?

+4
source share
1 answer

Starting with Java9, most of the com.sun.*APIs are not supported , internal JDK APIs, and they can leave at any time. Also, as described in the noteworthy column -

You must go to use . javafx.collections.FXCollections

+8
source

Source: https://habr.com/ru/post/1691937/


All Articles