Make location of substances and compounds customizable
In Java, the SESubstanceManager
class loads the substances and compounds via the loadSubstanceDirectory()
method. This method hard-codes the path to the substances
and compounds
directories as relative to the working directory. This method is called internally by Pulse when PulseEngine.initializeEngine(...)
is called.
The problem is that when deploying a java application, how these directories are packaged with the application may require them to be elsewhere. Additionally, the current working directory cannot be reliably changed from within Java. Changing the user.dir
system property and even using jnr-posix to change the directory from the OS side did not work. (I'm using Java 11 64-bit on Windows 10.)
Perhaps a configuration file or additional params to initializeEngine()
could allow the location to be specified.