Learn Once Use Everywhere: Using JavaScript APIs in Java for Web Browser

Dr. Lofi Dewanto
4 min readSep 9, 2020

Last time we saw how we can reuse our Java code in JavaScript from my article “Web Browser Programming in Java”. Today we’ll take a look on how we could call the JavaScript APIs, web apps and frameworks from our Java code and at the end to transpile them back to JavaScript so that it will be runnable on the web browser.

To see how we could do this, it is important that we understand the process on how Java with GWT (http://www.gwtproject.org) or J2CL (https://github.com/google/j2cl) communicates with…

--

--