Github user ejwhite922 commented on the issue:
https://github.com/apache/incubator-rya/pull/264
An alternative could be to escape all '\\' characters instead of changing
to '/'. Would this be a better solution?
final String userHome = System.getProperty("user.home");
// Replace all '\\' with '\\\\' (escaping for regex and again for java)
final String escapedUserHome = userHome.replaceAll("\\\\\\\\",
"\\\\\\\\\\\\\\\\");
final Path rootedFile = Paths.get( file.replaceFirst("^~", escapedUserHome)
);
---