Use the resolve
method on Path
.
There are two methods with this name. One takes a relative Path
and the other a String
. It uses the Path
on which it is called as a parent and appends the String
or relative Path
appropriately.
Path parent = Paths.get("c:\\tmp");
Path child = parent.resolve("child");
Related Contents:
- Recursively list files in Java
- Java: Path vs File
- How to check the extension of a Java 7 Path
- When to use ** (double star) in glob syntax within JAVA
- Java access files in jar causes java.nio.file.FileSystemNotFoundException
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- How to get the path of a running JAR file?
- What is the point of the diamond operator () in Java?
- Installed Java 7 on Mac OS X but Terminal is still using version 6
- Is “Java Concurrency In Practice” still valid? [closed]
- How to construct a relative path in Java from two absolute paths (or URLs)?
- Get java.nio.file.Path object from java.io.File
- Java 7 language features with Android
- How to get a path to a resource in a Java JAR file
- Java NIO FileChannel versus FileOutputstream performance / usefulness
- Can Java 8 code be compiled to run on Java 7 JVM?
- Check if a path represents a file or a folder
- ByteBuffer.allocate() vs. ByteBuffer.allocateDirect()
- How to set IntelliJ IDEA Project SDK
- Does Java have a path joining method? [duplicate]
- Java: int array initializes with nonzero elements
- Why does the difference between 30 March and 1 March 2020 erroneously give 28 days instead of 29?
- How to update PATH variable permanently from Windows command line?
- invalid target release: 1.7
- Technically what is the main difference between Oracle JDK and OpenJDK? [duplicate]
- Java error: Comparison method violates its general contract
- Differences in auto-unboxing between Java 6 vs Java 7
- How to add native library to “java.library.path” with Eclipse launch (instead of overriding it)
- Java G1 garbage collection in production
- Java: what exactly is the difference between NIO and NIO.2?
- Java: Converting String to and from ByteBuffer and associated problems
- java.lang.VerifyError: Expecting a stackmap frame at branch target JDK 1.7
- Maximum size of a method in Java 7 and 8
- How to locate the Path of the current project directory in Java (IDE)?
- How Numeric literal with underscore works in java and why it was added as part of jdk 1.7 [duplicate]
- How to install java jdk 7 on Snow Leopard
- How serious is the Java7 “Solr/Lucene” bug?
- Convert URL to normal windows filename Java
- Java best practice: Class with only static methods
- Support for Compressed Strings being Dropped in HotSpot JVM?
- Alternative to File.deleteOnExit() in Java NIO?
- MethodHandle – What is it all about?
- Java NIO file path issue
- intern() behaving differently in Java 6 and Java 7
- Why isn’t getSelectedItem() on JComboBox generic?
- Is Java 7 WatchService Slow for Anyone Else?
- What is the exact use of java nio package when already methods are available with io package
- Maven doesn’t use Java 7
- How safe is it to use -XX:-UseSplitVerifier?
- Best way to write String to file using java nio