CheerpJ Java-to-JavaScript compiler boosts exception handling, native methods

0
58


Version 2.1 of the , released April 6, brings optimizations to exception handling and native methods.

Described as a maintenance release, CheerpJ 2.1 introduces optimizations for exception handling, which are now compiled to “much more efficient” JavaScript code, according to a on the version 2.1 upgrade. In addition, native Java reflection calls have been optimized, thus lowering the overhead in comparison with standard Java calls. The build size of ahead-of-time JavaScript output has been reduced as well.

CheerpJ converts a Java client application into standard HTML, JavaScript, and , working from Java bytecode without requiring access to source code. CheerpJ 2.1 also features:

  • Improvements to the -stub-natives, a cheerpjfy.py option that creates stub JavaScript files for native methods, enabling development of browser-based implementations of native methods in JavaScript/WebAssembly.
  • Improvements to the robustness of the ahead-of-time compiler.
  • Improvements in Java-JavaScript interoperability.

CheerpJ added WebAsssembly support with release 2.0, which arrived in February.  CheerpJ 2.1 is available for Windows, MacOS, and Linux at . Developed and supported by Leaning Technologies, CheerpJ works on Java Swing clients, Java applets, and Java libraries.

Copyright © 2020 IDG Communications, Inc.