Library mode
Use Java libraries in JavaScript
Library mode allows you to directly use Java methods, objects, and arrays from JavaScript. This API has been designed to take advantage of async/await to feel more natural to use, without sacrificing any flexibility.
Loading a library is as simple as calling cheerpjRunLibrary
.
Library mode can be used to integrate powerful Java libraries into your Web application. As a practical example, these few lines of code make it possible to generate a PDF from JavaScript using the popular iText library:
See also
Library mode is also used for native
methods implemented in JavaScript. A native
is effectively just a shorter library mode session.