Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 2.53 KB

File metadata and controls

73 lines (47 loc) · 2.53 KB

Jason in a command shell

Table of Contents

with Gradle

Requirements:

  • Java >= 8

  • Gradle

You have to install Gradle on your computer and then run the following commands to create a new application (the first time you run, it takes a while to finish since it downloads Jason):

curl -s -O http://jason.sourceforge.net/np/np30.gradle
gradle -b np30.gradle --console=plain
Note
np30.gradle creates an application based on Jason 3.0. You can replace it by npss.gradle to create a Jason application based on the current snap shot version. curl is a program that simply downloads the np30.gradle file from http://jason.sourceforge.net/np/np30.gradle.

You will be asked to enter the identification of the application and then instructions about how to run it will be shown.

Example of output:

> Task :run
Jason 3.0

Enter the identification of the new application: bobob
Creating path /Users/jomi/tmp/bobob

You can run your application with:
   $ cd /Users/jomi/tmp/bobob
   $ gradle -q --console=plain

an eclipse project can be created from menu File/Import,
option 'Existing Gradle Project'.

If you want to run a Jason application that was not created with a build.gradle file, you can download a template from here and replace

  • <VERSION> by the required Jason release (e.g. 3.0)

  • <PROJECT-FILE> by your .mas2j file (e.g. hello.mas2j).

  • <PROJECT-RUNNER-CLASS> by jason.infra.local.RunLocalMAS

with Scripts

Requirements:

  • Java >= 8

The first step is to download Jason here and unzip it. Then configure some environment variables: JASON_HOME should be the directory where you unzip the downloaded file (it should have the directories libs and scripts inside) and PATH. For example;

export JASON_HOME=$HOME/pro/jason-3.0
export PATH=$JASON_HOME/scripts:$PATH
  1. New applications can be created with

    jason-new-project nameofapplication
  2. The Jason IDE based on jEdit can be run with

    jason-ide
  3. Jason projects (.mas2j files) can be run with

    jason ../somewhere/some-project.mas2j

Atom

For an IDE lighter than Eclipse, we recommend Atom. The following package provide syntax highlight for AgentSpeak (the Jason language): language-agentspeak.

atom2