Folder Path in .properties file
<p>I was trying to put all the paths(folder paths/urls) in a .properties file, so that if I'm going to change my paths it will be easier. So this is one of the data in my path.properties:</p>

<pre><code>path.pvInfoIni=C:\\Palmus-HACMS\\PV\\PvInfo.ini
</code></pre>

<p>and this is the real directory of the file: </p>

<blockquote>
  <p>C:\Palmus-HACMS\PV\PVInfo.ini</p>
</blockquote>

<p>this path leads to an .ini file where data are being written.</p>

<p>Here's the code where I call the path:</p>

<pre><code>Properties property;
FileInputStream fs;     
fs = new FileInputStream(System.getProperty("user.dir")+"\\path.properties");


common.writeIniFileIdentify("PV-ID", PVIDNo); // PsFileAccessorIni.GetInstance().GetValueString(PsFileAccessorIni.PVIDLocation));
common.writeIniFileIdentify("PALMUS-ID", SerialNo);// PsFileAccessorIni.GetInstance().GetValueString(PsFileAccessorIni.PVIDLocation));
common.writeIniFileIdentify("Authentication", "VALID");// PsFileAccessorIni.GetInstance().GetValueString(PsFileAccessorIni.PVIDLocation));

property = new Properties();
property.load(fs);
System.out.println(property.getProperty("path.pvInfoIni"));
String pvId = property.getProperty("PV-ID");
String palmusId = property.getProperty("PALMUS-ID");
System.out.println(pvId);
System.out.println(palmusId);
</code></pre>

<p>And when I tried to run the program this is the output:</p>

<p><a href="https://i.stack.imgur.com/mkNyU.png" rel="nofollow"><img src="https://i.stack.imgur.com/mkNyU.png" alt="enter image description here"></a></p>

<p>I'm not sure if it really goes to that path. If so why does the pvId and palmusId is null? I hope someone can help me. I'm just new with this kind of stuffs. Thank you in advance.</p>

<p>P.S.
But when I use this code:</p>

<pre><code>Properties p = new Properties();
p.load(new FileInputStream("C://Palmus-HACMS/PV/PVInfo.ini"));
String pvId = p.getProperty("PV-ID");
String palmusId = p.getProperty("PALMUS-ID");
System.out.println(pvId);
System.out.println(palmusId);
</code></pre>

<p>the value of PV-ID and PALMUS-ID is being output.</p>