Short Bytes:Makers of Cheerp, a C++-to-JavaScript compiler, are here with their second offering, CheerpJ. CheerpJ converts any Java application and library to a browser-based web application. Notably, CheerpJ doesn’t need a source code access to compile Java bytecode into JavaScript. While CheerpJ’s limited release will take place in July, its full and commercial version will be shipped later this year.

CheerpJ is created by the makers of Cheerp, which is a C++-to-JS compiler which generates fully garbage-collectible and optimized JavaScript output. With the help of Cheerp and other tools, compiling C/C++ to the browser has become easier.

cheerpj java to javascript

Coming back to CheerpJ, it compiles Java bytecode into JS with 100% Java compatibility. The support also includes dynamic class loading and reflection.

Also Read:10 Reasons Why You Should Learn Java Programming Language

CheerpJ can be evoked on a whole Java archive or on individual class files to generates a .jar.js or .js output. It uses the original .jar metadata for reflection.

Once CheerpJ has completed the conversion, you can remove all the bytecode before the web deployment. CheerpJ also provides a simple tool for the same and helps in decreasing the download time. Very often the output JS is comparable to original Java code.

Article image

Notably, CheerpJ also provides different filesystem access methods, including a read-only and HTTP-based filesystem and more.

The creators of CheerpJ have also provided demos to showcase its capabilities. you’re able to take a look at themhere.

The restricted release of CheerpJ will happen in July. The full commercial version will be made available later this year. As a bonus, a Chrome extension calledCheerpJ Applet Runnerhas also been released.

Meanwhile, you can read more about CheerpJ here in theannouncement post.

Also Read:10 Reasons Why You Should Learn JavaScript