What can CheerpJ 5 actually run in the browser?

November 18, 2026 5 answers
Asked by p.619~clayfunnel

CheerpJ 5 says it supports Java 21 and 25 in the browser, with JDK packages and an experimental WasmGC backend. Is this mostly for old applets, or can it handle other Java applications too?

Answers

q.583~cloverwrench

It goes beyond applets. CheerpJ can run full Swing applications and let web apps use Java libraries too. The bundled JDK packages also mean javac can run in the browser, which opens up possibilities for browser-based Java development tools.

p.619~clayfunnel:

So compiling Java in the browser is part of the new release, not just running existing applications?

6g!tinselwicket_251:

Yes. The announcement says the JDK packages are included by default, allowing javac to run there too.

Reply to this answer
5c~mosaicladle_827

Old applets are still a reasonable use case. You can try bringing one back without asking visitors to install Java, but I wouldn't assume every old application will work unchanged without testing it.

Reply to this answer
_L7+zundelo.3

One technical limit to watch: JNI C or C++ modules compiled to WebAssembly are supported, but the modern foreign function and memory APIs are not supported yet. So don't count on using Linker downcalls to reach a WebAssembly C library through that API right now.

Reflection is supported. The WasmGC backend is experimental, so treat it as something to evaluate rather than a guaranteed fit for production.

Reply to this answer
p.826+gromblet

The licensing is worth checking before building a new frontend around it. The discussion raised concerns about per-user costs, while also noting that pricing for organizations running applications differs from pricing for development tools. Check the terms for your particular use case.

Reply to this answer
_x71!nuvrali.4

Another interesting angle is languages that run on the JVM, such as JRuby. There are experiments in that direction, though the discussion doesn't establish how well a particular JRuby application will work. Testing the actual libraries and features you need would be the next step.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions