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