File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Environment variables and JForum configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Environment variables and JForum configuration" Watch "Environment variables and JForum configuration" New topic
Author

Environment variables and JForum configuration

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
Is there any way environment variables can be used to modify JForum properties files? I've tried several variations, found this Stackoverflow post,

http://stackoverflow.com/questions/2263929/regarding-application-properties-file-and-environment-variable

but got no return from properties equipped with expanded environment variables bar 'null'.

This would be useful, as it is near impossible to match my local against the deployed config.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
My conclusion:

Environment variables do not seem to work within property files. However JForum cleanly abstracts it's configuration into a handful of files. If parallel installations of the application are not wanted, duplicate the config files, one for each stage, e.g. development, testing, deployment. In most circumstances,

SystemGlobals.properties

and the appropriate db config,

config > database > {mydatabase} > {mydatabase}.properties

are the only two which will need duplicating.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
There is much information on this in a later post - if setup configuration is of interest, please see here,
http://www.coderanch.com/t/627867/jforum/Setting-custom-configuration-variables-JForum
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Environment variables and JForum configuration