Class JavaConfiguration


  • public class JavaConfiguration
    extends java.lang.Object
    There are options to use various flavours of runtime compilers. Apache JCI is used as the interface to all the runtime compilers. You can also use the system property "drools.dialect.java.compiler" to set the desired compiler. The valid values are "ECLIPSE" and "NATIVE" only. drools.dialect.java.compiler = drools.dialect.java.compiler.lnglevel = <1.5|1.6> The default compiler is Eclipse and the default lngLevel is 1.5. The lngLevel will attempt to autodiscover your system using the system property "java.version"
    • Field Detail

      • LANGUAGE_LEVELS

        protected static final java.lang.String[] LANGUAGE_LEVELS
      • JAVA_COMPILER_PROPERTY

        public static final java.lang.String JAVA_COMPILER_PROPERTY
        See Also:
        Constant Field Values
      • JAVA_LANG_LEVEL_PROPERTY

        public static final java.lang.String JAVA_LANG_LEVEL_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • JavaConfiguration

        public JavaConfiguration()
    • Method Detail

      • findJavaVersion

        public static java.lang.String findJavaVersion()
      • findJavaVersion

        public static java.lang.String findJavaVersion​(java.lang.String level)
      • getJavaLanguageLevel

        public java.lang.String getJavaLanguageLevel()
      • setJavaLanguageLevel

        public void setJavaLanguageLevel​(java.lang.String languageLevel)
        You cannot set language level below 1.5, as we need static imports, 1.5 is now the default.
        Parameters:
        languageLevel -
      • setCompiler

        public void setCompiler​(JavaConfiguration.CompilerType compiler)
        Set the compiler to be used when building the rules semantic code blocks. This overrides the default, and even what was set as a system property.