CheerpJ 5 adds Java 21 and Java 25, and ships the full JDK, including javac . Here's how to use both.
Running a JAR on Java 25
<!doctype html> <html lang= "en" > <head> <meta charset= "utf-8" /> <script src= "https://cjrtnc.leaningtech.com/5.0/loader.js" ></script> </head> <body> <script type= "module" > await cheerpjInit ({ version : 25 }); cheerpjCreateDisplay ( 800 , 600 ); await cheerpjRunJar ( " /app/my_application.jar " ); </script> </body> </html>
Enter fullscreen mode
Exit fullscreen mode
version defaults to 8. The supported values are 8, 11, 17, 21 and 25. /app/ is your web server's root, so serve the folder over HTTP ( npx http-server -p 8080 ).…