System properties can be specified at JVM startup, using the command line argument -D. Additionally, system properties can be read or set using the getProperty() and setProperty() methods of the System class.
- log4j.configuration
-
Defines the location of the Apache Log4j framework configuration file.
For application blocks running on the Tomcat web server, this system property is configured in the
tomcat/bin/setenv.batandtomcat/bin/setenv.shfiles. By default, it points to thetomcat/conf/log4j.xmlconfiguration file.For the Desktop Client block, the application code configures this property, if it is not defined at JVM startup. By default it points to the
cuba-log4j.xmlfile located in the CLASSPATH root. A different configuration file can be specified by overriding thegetDefaultLog4jConfig()method of thecom.haulmont.cuba.desktop.Appclass. - cuba.desktop.home
-
For the Desktop Client block, this property defines the root for the folders defined in the cuba.confDir, cuba.logDir, cuba.tempDir, and cuba.dataDir application properties.
If this property is not defined at JVM startup, the default value of
${user.home}/.haulmont/cubawill be used. A different location can be specified by overriding thegetDefaultHomeDir()method of thecom.haulmont.cuba.desktop.Appclass. - cuba.unitTestMode
-
This system property is set to
truewhen theCubaTestCasebase class is running integration tests.Example:
if (!Boolean.valueOf(System.getProperty("cuba.unitTestMode"))) return "Not in test mode";

