CheerpJ converts Java apps into JavaScript for the web

Posted on 21-06-2017 , by: admin , in , 0 Comments

Melding Java and web development, CheerpJ is being readied as compiler technology that takes Java bytecode and turns it into JavaScript, for execution in browsers. Based on the LLVM/Clang compiler platform as well as Learning Technologies’ own Cheerp C++-to-JavaScript compiler, CheerpJ takes Java bytecode and turns it into JavaScript without needing the Java source.

In CheerpJ, applications and Java libraries are converted to web applications, so there is no need for plug-ins or Java installations. Server-side Java components can become client-side browser-based libraries while native Java code serves as platform-independent components for the Node.js server-side JavaScript platform.

CheerpJ features an offline compiler moving Java bytecode to JavaScript as well as a JavaScript-based Java runtime environment. Also part of the platform is an on-the-fly compiler for dynamic class generation for deployment alongside the application.

Bidirectional interoperability between Java and JavaScript enables invoking of any JavaScript library or browser API from Java. Also, any Java method can be exposed to JavaScript. CheerpJ can be invoked on Java archive (.jar) files as well as on single .class files. Converted applications that can be deployed on a web server via both jar.js JavaScript files and .jar files.