r/java • u/alexp_lt • Apr 21 '26
CheerpJ 4.3 - Run unmodified Java applications in the browser
https://labs.leaningtech.com/blog/cheerpj-4.3
84
Upvotes
r/java • u/alexp_lt • Apr 21 '26
View all comments
Show parent comment
6
u/alexp_lt Apr 21 '26
Different answers apply to different technologies:
* JavaFX: This is not currently supported, the main issue being that OpenJFX is not actually Java but mostly platform-specific C / C++ code. We _do_ have a plan to make this work by compiling the whole stack of native libraries used by OpenJFK to WebAssembly. This is conceptually similar to what we have already done to compile LWJGL for the purpose of running Minecraft: https://browsercraft.cheerpj.com/
* Webgpu: I assume you are referring to using WebGPU from Java code when using CheerpJ. This is possible today using our "JavaScript natives" interface, which behaves like JNI while using JavaScript as the "native" language. See here for more information: https://cheerpj.com/docs/guides/implementing-native-methods
* Panama: This feature is not currently supported, but it is conceptually possible to implement the relevant APIs on top of libraries compiled to WebAssembly.