frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

CheerpJ 4.0: WebAssembly JVM for the browser, now with Java 11 and JNI support

https://labs.leaningtech.com/blog/cheerpj-4.0
9•apignotti•11mo ago

Comments

palata•11mo ago
That's technically pretty cool, but it makes me wonder:

In order to run a Java Desktop app, I need to install a JVM first (or the Desktop app can embed it, I guess that's what IntelliJ does, right?).

Now if I run CheerpJ, it means that I essentially download a JVM when I load the page (every time), and run code in that JVM. But at this point, why not downloading a Desktop app?

It feels like we are going around, shipping simple web pages together with full browsers and calling that "desktop apps" (e.g. ElectronJS), then shipping complete JVMs as web pages and calling that a "web page"... why don't we just ship simple webpages through browsers and complex desktop apps through package managers?

apignotti•11mo ago
With CheerpJ you are downloading the subset of the JVM that you need, and actually only once thanks to the standard browser cache.

There are many reasons why shipping via the browser is a better choice compared to shipping desktop apps. The main 3 in my opinion are:

1. Distribution: Give your user a link and the app will start 2. Isolation: The user can have confidence the app won't read his personal files. 3. Cross-platform: Every OS and every device, for real this time

yuri91•11mo ago
For reference, when loading https://browsercraft.cheerpj.com for the first time (up to loading a world), my browser downloaded ~32MB.

The second time almost nothing.

jeffreportmill1•11mo ago
And here's an entire Java IDE with CheerpJ that downloads less than 15mb:

https://reportmill.com/SnapCode

palata•11mo ago
> With CheerpJ you are downloading the subset of the JVM that you need

That's interesting! May I ask how it works? Does that also happen with e.g. IntelliJ?

> Every OS and every device, for real this time

Doesn't the JVM run everywhere in 2025?

apignotti•11mo ago
> That's interesting! May I ask how it works? Does that also happen with e.g. IntelliJ?

Byte ranges request do most of the heavy lifting, data is loading exclusively on-demand.

> Doesn't the JVM run everywhere in 2025?

What about iOS? Android has Java, but can't run desktop Java apps. Chromebooks also have limits.

palata•11mo ago
> Byte ranges request do most of the heavy lifting, data is loading exclusively on-demand.

I don't understand what that means. The JVM is supposed to interpret and sometimes compile bytecode, right? How can it be done with only a fraction of the JVM?

Or are you saying that it is constantly communicating with a server that does the work?

apignotti•11mo ago
The VM itself is very small, it's the OpenJDK runtime that is quite sizeable. Byte ranges are used to only download the parts of the runtime (in terms of bytecode) that are required.

There is no server-side computation. CheerpJ runs code exclusively client-side.

palata•11mo ago
But you said before that you only download a subset of the JVM, right? Or did you mean a subset of the JDK, including the JVM and... I guess other stuff?
apignotti•11mo ago
I meant the JVM in an extended sense: the combination of the bytecode parsing, JIT compiler and OpenJDK runtime. You are right, I should have been more precise and refer to only the runtime part, which is by far the most significant.
palata•11mo ago
I was not trying to prove you wrong, I'm just genuinely interested :-). I don't see a lot of articles about the JVM these days.

Nothing Is Real, or Anything Can Be

https://velagao.substack.com/p/nothing-is-real-or-anything-can-be
1•velapod•43s ago•0 comments

P – Formal Modeling and Analysis of Distributed Systems from AWS

https://p-org.github.io/P/
1•polskibus•4m ago•0 comments

Void: A physics-aware video editing tool by Netflix

https://void-model.github.io/
1•Otterly99•5m ago•0 comments

The AI writing witchhunt is pointless

https://www.joanwestenberg.com/the-ai-writing-witchhunt-is-pointless/
1•speckx•5m ago•0 comments

Show HN: Moon simulator game, ray-casting

https://mooncraft2000.com
3•JKCalhoun•6m ago•0 comments

USB-Clawd and a Mini Fax Machine

https://benbyfax.substack.com/p/clawd-minifax
2•meetpateltech•7m ago•0 comments

Three Memory Architectures for AI Companions: Pgvector, Scratchpad, Filesystem

https://www.emotionmachine.com/blog/how-memory-works
1•sarbak•10m ago•0 comments

Color Generator

https://kigen.design/color
1•malshe•11m ago•0 comments

The one piece of data that could shed light on your job and AI

https://www.technologyreview.com/2026/04/06/1135187/the-one-piece-of-data-that-could-actually-she...
2•joozio•11m ago•0 comments

An Economist's Quest to Solve America's Wage Problem

https://www.newyorker.com/news/the-financial-page/an-economists-quest-to-solve-americas-wage-problem
1•mitchbob•12m ago•1 comments

NASA's Artemis II Crew Flies Around the Moon (Official Broadcast) [video]

https://www.youtube.com/watch?v=z-j1uxBmis0
1•gwbas1c•12m ago•0 comments

A Close Look at Security Envelope Patterns

https://www.inconspicuous.info/p/a-close-look-at-security-envelopes
1•gaws•12m ago•0 comments

AI Aggregation Affects Knowledge

https://www.nber.org/papers/w35036
1•paulpauper•13m ago•0 comments

Villa Aurora and Thomas Mann House in Los Angeles

https://www.goethe.de/prj/zei/en/art/24144257.html
1•bryanrasmussen•13m ago•0 comments

The OpenAI Safety Fellowship

https://openai.com/index/introducing-openai-safety-fellowship/
1•surprisetalk•13m ago•0 comments

The pain of microservices can be avoided, but not with traditional databases

https://blog.redplanetlabs.com/2026/03/31/the-pain-of-microservices-can-be-avoided-but-not-with-t...
3•nathanmarz•16m ago•0 comments

The frontline is like Terminator: fighting robots give Ukraine hope in war

https://www.theguardian.com/world/2026/apr/04/fighting-robots-give-ukraine-hope-in-war-with-russia
5•tanelpoder•17m ago•0 comments

AP says it will offer buyouts as part of pivot away from newspaper journalism

https://apnews.com/article/news-industry-buyouts-ap-newspapers-dd790effc6a385514b3323560161ea4f
3•clcaev•19m ago•1 comments

Prime number is not RANDOM. How we see change everything

https://zenodo.org/records/19435034
4•sunbagger•21m ago•0 comments

Alta Daily Uses Meta's Segment Anything to Reimagine the Digital Closet

https://ai.meta.com/blog/alta-daily-fashion-app-segment-anything/?_fb_noscript=1
2•surprisetalk•25m ago•0 comments

The Extinction of the Junior Engineer

https://michaelnovati.substack.com/p/the-extinction-of-the-junior-engineer
3•carabiner•26m ago•0 comments

How Native Americans shaped gambling and probability

https://libarts.source.colostate.edu/how-native-americans-shaped-gambling-and-probability/
2•gmays•28m ago•0 comments

4Track: The multitrack studio that fits in the browser

https://www.4track.cc/
3•thunderbong•28m ago•1 comments

Free VPNs that turn your device into a proxy exit node

https://voidmob.com/blog/free-vpns-proxies-sell-your-device
2•Alex_Numbers•29m ago•0 comments

I Built Sendkit.dev: AI – Native Email Infrastructure

https://sendkit.dev/
3•paulocastellano•30m ago•3 comments

Next-Gen Web Extension Framework – WXT

https://wxt.dev/
2•gurjeet•31m ago•0 comments

Accounting for Protest Voting in the U.S. Congress

https://www.cambridge.org/core/journals/political-analysis/article/accounting-for-protest-voting-...
2•PaulHoule•32m ago•0 comments

A Brief History of the Dust Jacket

https://firstruleofbookclub.com/book-history/a-brief-history-of-the-dust-jacket/
4•speckx•33m ago•0 comments

Show HN: Vif - An alpha|experimental alternative to PHP Composer

https://github.com/van-sprundel/vif
3•ramon156•33m ago•0 comments

Bfloat16 from Scratch

https://essenceia.github.io/projects/floating_dragon/
3•random__duck•34m ago•0 comments