highlight.js

Monday, August 16, 2021

Javet Supports Mac OS Now

Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding Node.js and V8 in Java.

I'm very happy to announce Javet supports Mac OS x86_64 from v0.9.9.

Maven

<dependency>
    <groupId>com.caoccao.javet</groupId>
    <artifactId>javet-macos</artifactId>
    <version>0.9.9</version>
</dependency>

Gradle Kotlin DSL

implementation("com.caoccao.javet:javet-macos:0.9.9")

Gradle Groovy DSL

implementation 'com.caoccao.javet:javet-macos:0.9.9'

Hello Javet

// Node.js Mode
try (V8Runtime v8Runtime = V8Host.getNodeInstance().createV8Runtime()) {
    System.out.println(v8Runtime.getExecutor("'Hello Javet'").executeString());
}

// V8 Mode
try (V8Runtime v8Runtime = V8Host.getV8Instance().createV8Runtime()) {
    System.out.println(v8Runtime.getExecutor("'Hello Javet'").executeString());
}

No comments:

Post a Comment

Cue Club 2 on Apple Silicon

It's been quite a long time for me not to play a decent snooker game since I replaced my Windows laptop with an Apple Silicon one. To be...