Install the HammurAPI.



  • Then go to the path that hammurapi-5.7.0-setup.jar is downloaded.
  • Install hammmurapi using this command in the terminal.
    • java -jar hammurapi-5.7.0-setup.jar
  • Then this will install hammerapi in your home folder. This contains DB (HSQLDB) and Tomcat also in the same package (eg : /home/namal/Hammurapi)

Start the DB (HSQLDB)

  • Go to the /home/namal/Hammurapi/db.
  • Give the excecution permission to runServer.bat.
  • Run it. (I double clicked and selected to “Run In the Terminal”).
    • The default port for the db is 9001. If the port is already bound, kill it after identifying the process ids using the netstat commands as mentioned below and run the runServer.bat again.
      • netstat –listen – You’ll get all the port numbers currently using
      • netstat -lpn | grep 9001 – You’ll get the process with process id that is using the port 9001
      • sudo kill 4758 : kill it

Start the Tomcat

  • Go to the /home/namal/Hammurapi/tomcat/bin
  • Give the excecution permission to ./
  • Run it as ./
  • If not executing run chmod +x *.sh first and then run it ./ again.
  • Test it with the http://localhost:8080

Install the ant to your system


  • Download the archive using the mentioned link.
  • Extract it to some directory. (In my case I copied it to the project folder that I’m willing to test)

Test the provided sample project.

There’s a sample project in the Hammurapi. We can test it first to verify that everything is OK behind the scene.

  • Go to the /home/namal/Hammurapi/sample
  • Run the following tasks on build.xml
    • apache-ant-1.9.3/bin/ant
    • apache-ant-1.9.3/bin/ant review
    • apache-ant-1.9.3/bin/ant wget
      • Here the report will be extracted into the /home/namal/Hammurapi/report folder
      • In this case provide the as a VM argument as mentioned above.

Test the project.

  • Take the project to the /home/namal/Hammurapi folder.
  • Put all the related jars refering from it in the lib folder.
  • Copy the build.xml to that folder.
  • Follow above tasks mentioned in the sample project