Created
December 22, 2021 00:44
-
-
Save jonasermert/c6b67b858ee5c06b5f6980f59cdd7b25 to your computer and use it in GitHub Desktop.
Revisions
-
jonasermert created this gist
Dec 22, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import java.io.FileInputStream; import java.util.Properties; public class ReadPropertiesFile { public static void main(String[] args) { FileInputStream fis = new FileInputStream("Path to file"); Properties prop = new Properties(); prop.load(fis); String uName = prop.getProperty("username"); String uPassword = prop.getProperty("password"); System.out.println(uName); System.out.println(uPassword); } }