I have this weird thing with input and output streams that I just can't understand. I use inputstream to read property files from these resources:
Properties prop = new Properties(); InputStream in = getClass().getResourceAsStream( "/resources/SQL.properties" ); rop.load(in); return prop;
It finds my file and its redness successfully. I am trying to write modified settings as follows:
prop.store(new FileOutputStream( "/resources/SQL.properties" ), null);
And I get a strange error while storing:
java.io.FileNotFoundException: \resources\SQL.properties (The system cannot find the path specified)
So why is the property path changing? How to fix it? I am using Netbeans on Windows
source share