Provided by the KayJam code executor


Keywords
executor, java, java-8, kayjam, kayjam-language, language, script, scripting-language
License
GPL-3.0

Documentation

KayJam code executor

CircleCI

Basic code executor for KayJam Core

How to use

  1. Add the library depending on:

    Maven:

    <dependency>
      <groupId>com.github.kayjamlang</groupId>
      <artifactId>executor</artifactId>
      <version>0.1.3.21</version>
    </dependency>

    Gradle:

    (Groovy)

    implementation group: 'com.github.kayjamlang', name: 'executor', version: '0.1.3.21'

    (Kts)

    implementation("com.github.kayjamlang:executor:version: '0.1.3.21")
  2. Call the method of the Executor class, which will return the result of the code execution in Object:

        class Main {
            public static void main(String[] args){
                String code = "println(\"Hello, World\");";
                Executor executor = new Executor();
                
                //Default library
                executor.addLibrary(new MainLibrary());
                executor.execute(code);
            }
        }   

Additionally

Library catalog for KayJam Executor