javajavafxjava-9java-modulejavafx-9

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:

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? Or how to bypass this problem?


Solution

  • Since Java9, most of the com.sun.* APIs are unsupported, JDK-internal APIs and they might go away at any time. Also as described in the noteworthy column -

    You should plan to move to using the javafx.collections.FXCollections instead.