Here you can find the source of loadFromFile(Path path)
public static Properties loadFromFile(Path path) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Properties; public class Main { public static Properties loadFromFile(Path path) throws IOException { Properties props = new Properties(); props.load(Files.newInputStream(path)); return props; }/*from w w w. j a va 2 s.co m*/ }