NotSerializableException on SimpleListProperty

后端 未结 6 1903
予麋鹿
予麋鹿 2020-12-10 08:09

I\'m using Javafx, and I wrap my objects into ListProperty to let the tableview updates for any changes on the objects of the list. Now I\'m trying to serialize my project a

6条回答
  •  孤城傲影
    2020-12-10 09:07

    You will need to create a custom serialization for your project.

    Refer to the following articles for details:

    1. StackOverflow question on Custom Serialization in Java.
    2. Official Oracle Tutorial on Custom Serialization in Java

    Alternately, you could write serialize using a text format such as JSON or XML using technology such as JAXB or javax.json.

    All JavaFX projects (and pretty much every object in the JavaFX framework as of JavaFX 2.x), does not implement Serializable so you cannot directly serialize a JavaFX property.

提交回复
热议问题