I want to call a javascript codebase from Java. It is in node.js package format and has some dependencies. I can use well known tools to bundle and transpile to one module. I would like to pre-compile it to jvm bytecodes and call it from jvm.
The compiler seem to expect some format of global functions definitions if I want to export interface for jvm to use, however none of bundler/transpiler tools support this format.
I want to call a javascript codebase from Java. It is in node.js package format and has some dependencies. I can use well known tools to bundle and transpile to one module. I would like to pre-compile it to jvm bytecodes and call it from jvm.
I went through the document of JavaScript compiler https://rhino.github.io/tools/javascript_compiler/
The compiler seem to expect some format of global functions definitions if I want to export interface for jvm to use, however none of bundler/transpiler tools support this format.