Page 1 of 1

properties for a lib

Posted: 24 Mar 2016, 21:07
by simpleSimon
I am writing several extensions and they are going to be sharing a database class which I will put in the extensions/lib folder. What is the best place to put a dot properties file for the library and how do I specify the path to it?

Thanks

Re: properties for a lib

Posted: 25 Mar 2016, 09:06
by Lapo
Hi,
if you want to user relative paths you can keep in mind that the "current directory" is the main SFS2X/ folder, where the launchers are located (sfs2x.sh and sfs2x-service).

You can build your path starting from that folder. In other words if you store the properties file under the __lib__/ folder then your relative path will be --> "extensions/__lib__/filename.properties"

cheers