Is there a way to override java.io.File to perform file path conversion using custom code? In this case, I would translate the remote paths to the mount point
, java.io.File , java.io.File.
JVM, java.endorsed.dirs, java -Xbootclasspath/p:path java launcher (java)
!!!
java.io.File , .
-, :
:
File file = new File("C:\\Users\\oreyes\\etc.txt");
:
File file = new File( Paths.get( "user.dir.etc" ));
Paths
class Paths {
private static ResourceBundle rs = ResourceBundle.getBundle("file.paths");
public static String get( String key ) {
rs.getString( key );
}
}
IDE ( )
Linux .
, java.io.File .