private CompilerType getDefaultCompiler ( ) { try { final String prop = this . conf . getChainedProperties ( ) . getProperty ( JAVA_COMPILER_PROPERTY , "ECLIPSE" ) ; if ( prop . equals ( "NATIVE" ) ) { return CompilerType . NATIVE ; } else if ( prop . equals ( "ECLIPSE" ) ) { return CompilerType . ECLIPSE ; } else if ( prop . equals ( "JANINO" ) ) { return CompilerType . JANINO ; } else { logger . error ( "Drools config: unable to use the drools.compiler property. Using default. It was set to:" + prop ) ; return CompilerType . ECLIPSE ; } } catch ( final SecurityException e ) { logger . error ( "Drools config: unable to read the drools.compiler property. Using default." , e ) ; return CompilerType . ECLIPSE ; } }
This will attempt to read the System property to work out what default to set . This should only be done once when the class is loaded . After that point you will have to programmatically override it .