Skip to main content

Will java.nio.file.Path implement Serializable?

1 reply [Last post]
Joined: 2006-11-09

Will java.nio.file.Path implement Serializable?

I'm trying to serialize an object that contains a Path object.

This results in: sun.nio.fs.UnixPath

JDK 1.7.0-ea-b63

Message was edited by: asailer

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-08-08

The nio-discuss mailing list would be the best place to bring this up. In short, Path is an abstract class that is designed to be extended. The simplest workaround is for your writeObject method to serialize the path as a URI or as a String where it make sense.