propsdatabase = new Properties();
try
{
// load a properties file
InputStream dbin = getClass().getResourceAsStream("/database.properties");
//props.load(in);
propsdatabase.load(dbin);
}
catch (IOException ex)
{
ex.printStackTrace();
}
I Want to access a file which is out of the jar file. just in the location of the jar file.
I am using a properties file named database.properties in main/resources folder .
The requirement is to change the location of database.properties outside the jar.
So I need something where the path can point to the location where the jar is .
I am using maven to build my jar
You can do it in two ways by defining absolute path for the pro
And