R
RigasMinho
I have this: Simple java code that loads in a properties file or an INI
file.
Same thing - compiles and works:
Properties defaultProps = new Properties();
FileInputStream in = new FileInputStream("Test.properties");
defaultProps.load(in);
in.close();
Here's the deal though - it only works if the test.properties file is
located in the same directory as the java file.
meaning d:\Javafiles\Properties.java -the folder javafiles has also the
file Test.Properties in the directory as well.
Is it possible to put the Test.properties file in say the C: drive and
call upon it that way?
I tried this:
FileInputStream in = new FileInputStream("c:\Test.properties");
but i get errors.
Any ideas?
file.
Same thing - compiles and works:
Properties defaultProps = new Properties();
FileInputStream in = new FileInputStream("Test.properties");
defaultProps.load(in);
in.close();
Here's the deal though - it only works if the test.properties file is
located in the same directory as the java file.
meaning d:\Javafiles\Properties.java -the folder javafiles has also the
file Test.Properties in the directory as well.
Is it possible to put the Test.properties file in say the C: drive and
call upon it that way?
I tried this:
FileInputStream in = new FileInputStream("c:\Test.properties");
but i get errors.
Any ideas?