Java bindings for a very compact embedded JavaScript engine.
Switch branches/tags
Nothing to show
Clone or download
webfolderio Update README.md
Added download link [skip ci]
Latest commit c242f36 Dec 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Updated travis.yml Sep 26, 2018
native Add build script for msvc [skip ci] Oct 13, 2018
src Measure vue performance Oct 13, 2018
.gitignore bump version 1.0.0 [skip ci] Nov 27, 2018
.travis.yml Update travis.yml Sep 26, 2018
LICENSE Initial commit Sep 23, 2018
README.md Update README.md Dec 4, 2018
appveyor.yml Fixed build order Sep 24, 2018
pom.xml bump version 1.0.0 [skip ci] Nov 27, 2018

README.md

duktape4j

AppVeyor circleci travis FOSSA Status

Java binding for Duktape, a very compact embedded ECMAScript (JavaScript) engine.

ducktape4j is Java port of duktape-android.

Supported Java Versions

Oracle & OpenJDK Java 8, 11.

Both the JRE and the JDK are suitable for use with this library.

Stability

This library is suitable for use in production systems.

Supported Platforms

  • Windows 8 & Windows 10 (64-bit)
  • Ubuntu (64-bit)
  • macOS High Sierra (10.13)

How it is tested

ducktape4j is regularly tested on appveyor (Windows), circleci (Ubuntu) and travis (macOS).

Integration with Maven

To use the official release of duktape4j, please use the following snippet in your pom.xml file.

Add the following to your POM's <dependencies> tag:

<dependency>
    <groupId>io.webfolder</groupId>
    <artifactId>duktape4j</artifactId>
    <version>1.0.0</version>
</dependency>

Download

duktape4j-1.0.0.jar - 1522 KB

Usage Examples

public class HelloWorld {

    public static interface Console {
        default void info(String message) {
            System.out.println(message);
        }
    }

    public static void main(String[] args) {
        try (Duktape duktape = Duktape.create()) {
            duktape.set("console", Console.class, new Console() { });
            duktape.evaluate("console.info('hello, world!')");
        }
    }
}

License

Licensed under the Apache License.

Note: The included C code from Duktape is licensed under MIT and duktape-android licensed under Apache.

FOSSA Status