Hello World Drools Program

To create a basic Drools program, open Eclipse

Go to File -> New -> Project

How to create Drools Runtime


Select Drools Project. Give a suitable name for the project. For example : FirstDroolsProgram

The next screen shows to select some files which you want in your first drools project.

How to create Drools Runtime


Select the first two files. The first file is a .drl file(Drools Rule File) and the second is a java class for loading and executing the HelloWorld rule.

Click on Next -> Finish.

How to create Drools Runtime


Once you click on Finish, a FirstDroolsProgram project is created in your workspace.

Open the java class and then right click and run as java application. You see the output as below :

How to create Drools Runtime


We will be explaining the program after the next section where let us first explain the basic terms of Rule Engine.