Indeed, Path.of was later introduced.

Conjecture: it was introduced for the sake of a consistent Foo.of style.

From the mailing list archive, this method was once called Path.get:

The main changes in are in Path and Paths in java.nio.file.

This patch copies the Paths.get() methods to static methods in Path.get() and modifies the former to call the latter respective methods. The Path specification is slightly cleaned up not to refer to Paths nor itself, e.g., “(see Path).” @implSpec annotations are added to Paths to indicate that the methods simply call their counterparts in Path.
...

This was later changed when Brian Goetz suggested it to be consistent with Foo.of:

Separately, Brian Goetz suggested off-list that it would be more consistent if these factory methods were named "of" so I assume the webrev will be updated to see how that looks.

Now to your last question: "In that case, it would be considered preferable on consistency/aesthetic grounds?"
In the initial mail Brian Burkhalter said that he updated all references to the new method in Path:

All source files in java.base are modified to change Paths.get() to Path.get() and to remove the import for Paths. ...

So I would therefore conclude that Path.of is indeed preferable to Paths.get.
Indeed, if you look at the Javadoc for Paths for Java 13 you will find this note:

API Note:
It is recommended to obtain a Path via the Path.of methods instead of via the get methods defined in this class as this class may be deprecated in a future release.

Answer from Johannes Kuhn on Stack Overflow
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › nio › file › Paths.html
Paths (Java Platform SE 8 )
April 21, 2026 - The Path is obtained by invoking the getPath method of the default FileSystem.
🌐
Medium
medium.com › @AlexanderObregon › javas-paths-get-method-explained-9586c13f2c5c
Java’s Paths.get() Method Explained | Medium
September 8, 2024 - Explore how Java's Paths.get() method simplifies cross-platform file management by converting strings or URIs into file paths with ease.
🌐
Dev.java
dev.java › learn › java-io › file-system › path
Working with Paths - Dev.java
The Paths.get(String) method is shorthand for the following code: The following example creates /u/joe/logs/foo.log assuming your home directory is /u/joe, or C:\joe\logs\foo.log if you are on Windows. Two factory methods have been added to the Path interface in Java SE 9.
Top answer
1 of 1
74

Indeed, Path.of was later introduced.

Conjecture: it was introduced for the sake of a consistent Foo.of style.

From the mailing list archive, this method was once called Path.get:

The main changes in are in Path and Paths in java.nio.file.

This patch copies the Paths.get() methods to static methods in Path.get() and modifies the former to call the latter respective methods. The Path specification is slightly cleaned up not to refer to Paths nor itself, e.g., “(see Path).” @implSpec annotations are added to Paths to indicate that the methods simply call their counterparts in Path.
...

This was later changed when Brian Goetz suggested it to be consistent with Foo.of:

Separately, Brian Goetz suggested off-list that it would be more consistent if these factory methods were named "of" so I assume the webrev will be updated to see how that looks.

Now to your last question: "In that case, it would be considered preferable on consistency/aesthetic grounds?"
In the initial mail Brian Burkhalter said that he updated all references to the new method in Path:

All source files in java.base are modified to change Paths.get() to Path.get() and to remove the import for Paths. ...

So I would therefore conclude that Path.of is indeed preferable to Paths.get.
Indeed, if you look at the Javadoc for Paths for Java 13 you will find this note:

API Note:
It is recommended to obtain a Path via the Path.of methods instead of via the get methods defined in this class as this class may be deprecated in a future release.

🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › java.nio.filenio.paths.get
Paths.Get Method (Java.Nio.FileNio) | Microsoft Learn
Converts the given URI to a Path object. This method iterates over the FileSystemProvider#installedProviders() installed providers to locate the provider that is identified by the URI URI#getScheme scheme of the given URI.
🌐
Java
download.java.net › java › early_access › panama › docs › api › java.base › java › nio › file › Paths.html
Paths (Java SE 19 & JDK 19 [build 1])
It is recommended to obtain a Path via the Path.of methods instead of via the get methods defined in this class as this class may be deprecated in a future release.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-nio-file-paths-class-in-java
java.nio.file.Paths Class in Java - GeeksforGeeks
March 12, 2021 - // Java program to demonstrate // java.nio.file.Path.get(URI uri) method import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Paths; public class Path { public static void main(String[] args) throws IOException, URISyntaxException { String uribase = "https://www.geeksforgeeks.org/"; // Constructor to create a new URI // by parsing the string URI uri = new URI(uribase); // create object of Path Path path = (Path)Paths.get(uri); // print ParentPath System.out.println(path); } }
Find elsewhere
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › nio › file › Paths.html
Paths (Java SE 11 & JDK 11 )
January 20, 2026 - InvalidPathException - if the path string cannot be converted to a Path · See Also: FileSystem.getPath(java.lang.String, java.lang.String...), Path.of(String,String...) public static Path get​(URI uri) Converts the given URI to a Path object. Implementation Requirements: This method simply ...
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › nio › file › Path.html
Path (Java Platform SE 8 )
April 21, 2026 - A Path is considered to be an empty path if it consists solely of one name element that is empty. Accessing a file using an empty path is equivalent to accessing the default directory of the file system. Path defines the getFileName, getParent, getRoot, and subpath methods to access the path ...
🌐
Java Tips
javatips.net › api › java.nio.file.paths.get
Java Examples for java.nio.file.Paths.get
@Test public void test() { { final String FILENAME = "file name.txt"; final org.uberfire.java.nio.file.Path path = org.uberfire.java.nio.file.Paths.get("file://reponame/path/to/").resolve(FILENAME); assertEquals(FILENAME, path.getFileName().toString()); assertEquals(FILENAME, Paths.convert(path).getFileName()); assertEquals(FILENAME, Paths.convert(Paths.convert(path)).getFileName().toString()); System.out.println(path.toUri().toString()); System.out.println(Paths.convert(path).toURI()); System.out.println(Paths.convert(Paths.convert(path)).toUri().toString()); } { final String FILENAME = "file
🌐
W3Schools
w3schools.com › java › java_files.asp
Java Files
If you don't know what a package is, read our Java Packages Tutorial. The File class has many useful methods for creating and getting information about files.
🌐
Baeldung
baeldung.com › home › java › java io › java nio2 path api
Java NIO2 Path API | Baeldung
January 8, 2024 - The NIO2 support is bundled in the java.nio.file package. So setting up your project to use the Path APIs is just a matter of importing everything in this package: ... Since the code samples in this article will probably be running in different environments, let’s get a handle on the home directory of the user:
🌐
Swagger
swagger.io › specification
OpenAPI Specification - Version 3.1.0 | Swagger
The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without access to source code, documentation, or network traffic inspection.
🌐
How to do in Java
howtodoinjava.com › home › i/o › getting filesystem paths in java
Getting Filesystem Paths in Java
April 13, 2022 - Learn the difference between path, absolute and canonical paths. Learn to get the path of file in Java using standard IO and New IO classes.
🌐
Android Developers
developer.android.com › api reference › paths
Paths | API reference | Android Developers
Skip to main content · English · Deutsch · Español – América Latina · Français · Indonesia · Polski · Português – Brasil · Tiếng Việt · 中文 – 简体
🌐
Medium
medium.com › javarevisited › understanding-the-java-nio-file-path-class-in-java-ff1b149b2d65
Understanding the java.nio.file.Path Class in Java | by WhatInDev | Javarevisited | Medium
January 19, 2025 - The java.nio.file.Path class is a cornerstone of the Java NIO (New Input/Output) package, introduced in Java 7. It provides an efficient way to represent and manipulate file and directory paths.
🌐
GeeksforGeeks
geeksforgeeks.org › java › file-getpath-method-in-java-with-examples
File getPath() method in Java with Examples - GeeksforGeeks
July 11, 2025 - Below programs will illustrate the use of the getPath() function: Example 1: We are given a file object of a file, we have to get the path of the file object. ... // Java program to demonstrate the // use of getPath() function import java.io.*; ...
🌐
Junit
docs.junit.org › 6.0.3 › overview.html
Overview :: JUnit User Guide
It requires JUnit 4.12 or later to be present on the class path or module path. Note, however, that the JUnit Vintage engine is deprecated and should only be used temporarily while migrating tests to JUnit Jupiter or another testing framework with native JUnit Platform support. JUnit requires Java ...