duktape4j

The Duktape embeddable Javascript engine packaged for Java.

License

License

Categories

Categories

Tape Data Data Structures
GroupId

GroupId

io.webfolder
ArtifactId

ArtifactId

duktape4j
Last Version

Last Version

1.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

duktape4j
The Duktape embeddable Javascript engine packaged for Java.
Project URL

Project URL

https://webfolder.io
Project Organization

Project Organization

WebFolder OÜ
Source Code Management

Source Code Management

https://github.com/webfolderio/duktape4j.git

Download duktape4j

How to add to project

<!-- https://jarcasting.com/artifacts/io.webfolder/duktape4j/ -->
<dependency>
    <groupId>io.webfolder</groupId>
    <artifactId>duktape4j</artifactId>
    <version>1.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.webfolder/duktape4j/
implementation 'io.webfolder:duktape4j:1.2.1'
// https://jarcasting.com/artifacts/io.webfolder/duktape4j/
implementation ("io.webfolder:duktape4j:1.2.1")
'io.webfolder:duktape4j:jar:1.2.1'
<dependency org="io.webfolder" name="duktape4j" rev="1.2.1">
  <artifact name="duktape4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.webfolder', module='duktape4j', version='1.2.1')
)
libraryDependencies += "io.webfolder" % "duktape4j" % "1.2.1"
[io.webfolder/duktape4j "1.2.1"]

Dependencies

test (3)

Group / Artifact Type Version
junit : junit jar 4.13
com.google.truth : truth jar 1.0
com.squareup.okio : okio jar 1.15.0

Project Modules

There are no modules declared in this project.

duktape4j

duktape4j FOSSA Status License

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

duktape4j 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) (MSVC 2017)
  • Ubuntu (64-bit) (gcc)
  • macOS Catalina (10.15) (clang)

How it is tested

duktape4j is regularly tested on github actions.

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.2.1</version>
</dependency>

Download

duktape4j-1.2.1.jar - 1189 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

Versions

Version
1.2.1
1.2.0
1.1.0
1.0.0