user3169231 user3169231 - 1 year ago 154
Ini Question

Maven Project : How to specify a relative path in a *.ini file?

In a Maven project, I have a settings.ini file in this directory :


file, needs to refer to another file,
under this directory :


So, I tried this relative path in my
file, but it didn't work:

temp_database = ../databases/tempDB.sql

How do I specify a relative path in my

Answer Source

As the path will not be read by the .ini file itself, your code will use the project root directory as the start. In this case, you should use:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download