Skip to content

Instantly share code, notes, and snippets.

@mikehearn
Created March 28, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikehearn/37db30f5350a679600a7ab0b8a03bc44 to your computer and use it in GitHub Desktop.
Save mikehearn/37db30f5350a679600a7ab0b8a03bc44 to your computer and use it in GitHub Desktop.
import net.plan99.nodejs.NodeJS;
public class Demo {
public static void main(String[] args) {
int result = NodeJS.runJS(() ->
NodeJS.eval("return 2 + 3 + 4").asInt()
);
System.out.println(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment