 <blockquote> <p><em>Is there a way to override java.io.File to perform the file path translation with custom code? In this case, I would translate the remote paths to a mount point</em></p> </blockquote> <p>Yes, you can perform your own implementation of <code>java.io.File</code> and place it in a separate jar and then load it instead of the real <code>java.io.File</code>.</p> <p>To have the JVM load it you can either use the <code>java.endorsed.dirs</code> property or <code>java -Xbootclasspath/p:path</code> option in the java launcher ( java ) </p> <p><strong>BUT!!!</strong> </p> <p>Creating your own version of the <code>java.io.File</code> class won't be as easy as modifying the legacy source code. </p> <p>If you're afraid of breaking something you could first extract all your hardcoded paths to use a resource bundle:</p> <p>So:</p> <pre><code> File file = new File("C:\\Users\\oreyes\\etc.txt"); </code></pre> <p>Would be:</p> <pre><code>File file = new File( Paths.get( "user.dir.etc" )); </code></pre> <p>And <code>Paths</code> would have a resource bundle internally</p> <pre><code>class Paths { private static ResourceBundle rs = ResourceBundle.getBundle("file.paths"); public static String get( String key ) { rs.getString( key ); } } </code></pre> <p>You can have all this hardcoded paths extraction with an IDE ( usually an internationalization plugin ) </p> <p>Provide a different resource bundle for Linux and your done. Test and re-test and re-test</p> <p>So, use provide your own <code>java.io.File</code> only as a last resource. </p>