def execute(**kargs):
    command = kargs.get("command")
    app = kargs.get("app")
    args = kargs.get("args")
    env = kargs.get("env")

    if command == "doc:export":
        print "~ Generating project documentation"
        print "~ "
        java_cmd = app.java_cmd([], None, "play.modules.docviewer.ExportDocumentationGenerator", args)
        try:
            subprocess.call(java_cmd, env=os.environ)
        except __HOLE__:
            print "Could not execute the java executable, please make sure the JAVA_HOME environment variable is set properly (the java executable should reside at JAVA_HOME/bin/java). "
            sys.exit(-1)
        print

# This will be executed before any command (new, run...)
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/modules/docviewer/commands.py/execute