News for hackers. Stuff that matters.
Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by letters90 on Wednesday May 28, 2025 @07:01AM (#44114682)
The minecraft demo is quite impressive

https://browsercraft.cheerpj.com/

Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by apignotti on Wednesday May 28, 2025 @07:04AM (#44114699)
Thanks. Architecturally, beside the unmodified Minecraft and LWJGL jars, this demo uses the original JNI code from LWJGL, compiled from C++ to WebAssembly.
Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by 90s_dev on Wednesday May 28, 2025 @07:06AM (#44114706)
Clever.

Java seems to have come a long way since 2015. Might be worth looking into, if only I could find a page that summarizes every new language feature.

Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by _old_dude_ on Wednesday May 28, 2025 @07:16AM (#44114754)
Java Almanac has a list of all features https://javaalmanac.io/features/

And the main page let you compare API versions https://javaalmanac.io/

Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by creatonez on Wednesday May 28, 2025 @07:33AM (#44114847)
I've grown disappointed by these technically impressive demos, now that older Minecraft running in WASM is no longer novel ever since Eaglercraft came out. As per the article:

> The latest version of Minecraft. Newer releases of Minecraft use a newer version of Java and OpenGL which we currently do not support. [...] This demo demonstrate these capabilities by running an older version (1.2.5) of Minecraft and LWJGL entirely in the browser.

Sadly, no one seems to be able to get past Minecraft 1.5, which was released in 2013 :(

Edit: Hmm... not sure when this happened, but Eaglercraft supports 1.12 (2017) now. Neat! Might be hard to go further than that, since modern Minecraft uses Java 21 / OpenGL 3.2, and LWJGL itself has evolved significantly in its platform APIs.

Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by apignotti on Wednesday May 28, 2025 @07:38AM (#44114873)
As a matter of fact we have internally achieved 1.16.5.

The Java side of things works out-of-the-box, but LWJGL3 JNI code uses some subtle techniques that are yet supported in public builds of CheerpJ.

Now that we have Java 17 support we expect to be able to move even further.

Re:CheerpJ 4.1: Java in the browser, now supporting Java 17 ... by bufferoverflow on Wednesday May 28, 2025 @12:12PM (#44117598)
Works on my smartphone. That's wild.