News for hackers. Stuff that matters.
Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by palata on Wednesday April 23, 2025 @11:39AM (#43773381)
> 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?

Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by apignotti on Wednesday April 23, 2025 @11:43AM (#43773430)
> 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.

Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by palata on Wednesday April 23, 2025 @03:29PM (#43775800)
> 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?

Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by apignotti on Wednesday April 23, 2025 @03:55PM (#43776030)
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.

Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by palata on Thursday April 24, 2025 @09:34AM (#43782557)
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?
Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by apignotti on Thursday April 24, 2025 @09:52AM (#43782839)
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.
Re:CheerpJ 4.0: WebAssembly JVM for the browser, now with Ja... by palata on Thursday April 24, 2025 @10:07AM (#43782973)
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.