From 5bfba8e822c37fc90f625e2ca0f689e62a2f9a2e Mon Sep 17 00:00:00 2001 From: Hemanth Babu Date: Mon, 18 Aug 2014 17:43:58 +0530 Subject: [PATCH] Corrected way of reading Commandline Args into Props load API --- owner-site/site/docs/importing-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owner-site/site/docs/importing-properties.md b/owner-site/site/docs/importing-properties.md index d9a1efad..0962eb89 100644 --- a/owner-site/site/docs/importing-properties.md +++ b/owner-site/site/docs/importing-properties.md @@ -125,7 +125,7 @@ public static void main(String[] args) { MyConfig cfg; if (args.lenght() > 0) { Properties props = new Properties(); - props.load(new File(args[0]); + props.load(new FileInputStream(new File(args[0]))); cfg = ConfigFactory.create(MyConfig.class, userProps); } else { cfg = ConfigFactory.create(MyConfig.class);