After over a year of development, I am very excited to announce that J2V8 4 is publicly available on all supported platforms. J2V8 is a set of V8 bindings for Java. This means that you can embed V8 (Google’s ultra fast JavaScript engine) into your Java applications. J2V8 4 is built on Node.js, which means you can also integrate Node.js with the JVM (On Windows, Mac and Linux).


The biggest change in J2V8 4 is the use of V8 4.x, which enables many ES6 features.

public static void main(String[] args) {
  V8 v8 = V8.createV8Runtime();
  int x = (Integer) v8.executeScript("var func = x => x * x; func(5);");

A number of notable features have been included in J2v8 4. I will expand on each of these further:

  1. Running Node.js on the JVM
  2. ByteBuffer backed TypedArrays (Shared memory between Java and V8)
  3. UTF-16 Support
  4. JavaScript functions written entirely in Java
  5. Improved Memory Management API

In addition to these New and Noteworthy features, a number of new APIs have been added. It’s easier to call JavaScript functions from Java, the memory model for callbacks has been improved, and build instructions have been published.

The technical version is 4.5.0 because we had a number of pre-releases for single platforms. This is the first time that all this work has been released for all supported platforms. J2V8 currently supports: Windows 32, Windows 64, MacOS, Linux 64, Android ARM and Android x86 (The Node.js integration is not available in the Android builds).

You can use J2V8 4 today by adding the following dependency to your pom.xml file.


The artifacts are system dependent because they include native libraries. Replace the artifactId for other platforms:

  • j2v8_macosx_x86_64
  • j2v8_win32_x86_64
  • j2v8_win32_x86
  • j2v8_linux_x86_64

Or use the following pom dependency to consume an Android AAR archive for Arm and x86:


For more news on J2V8, follow me on Twitter.

  • Bernat
    Posted at 19:21, 2016-07-27


    In my Java code can I access and execute JavaScript functions of a separate .js file? If so, can you please describe me how?

    Thank you:


  • Min Idzelis
    Posted at 21:44, 2016-07-27

    Can you explain how debugging works? Do I have to use Google’s eclipse plugin to debug node, or can I open to show the embedded node.js chrome dev tools, which is how I typically debug node.js apps?

  • Bernat
    Posted at 12:38, 2016-08-09

    @Ian Bull, I asked it on StackOverflow. The link is:

  • AtulV
    Posted at 17:28, 2017-02-19

    Where can I download the latest jar files for J2v8?

    • Gosia Mitros
      Posted at 13:23, 2017-02-27

      J2v8 is available from Maven Central. The latest release is 4.6.0.