I’m trying to create configuration file for database connection. Properties file would be best. This properties have to be changed after every application installation (customers database).
-
I want this config file in the root of application (netbeans platform
project, and distro folder). I can’t find way how to refer to
application root folder. -
I also find lack of documentation for FileUtil.getConfigFile/Root. I
don’t know where to find the configRoot (if it is even physical), or
how to add ConfigFile offline (not in code, but just with copying
config file). -
Tolerable solution woud be to add database configuration to system
properties, but i can’t find where to specify additional system properties
in netbeans configuration files.
You can place the properties file in a Release folder of one of your modules then access it with the InstalledFileLocator API: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/InstalledFileLocator.html