Live data from Hacker News

CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

leaningtech.com

71–80 of 179 posts

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#73

For anyone interested in the Kotlin side of things: Kotlin has a great compat with Kotlin/JS[0]. they also have Compose For Web which is more WASM based[1] though its marked as experimental [0]: https://kotlinlang.org/docs/js-overview.html [1]: https://github.com/Kotlin/kotlin-wasm-examples/tree/main/com...

Have you used them in production and would you recommend it?

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#74
post #46

With this and Ruffle, we will soon return to the days of Internet Explorer 6 but with 4k monitors! All we need now is to run ActiveX. I think BottledWine can run Windows executables in the browser, how hard would it be to simulate the ActiveX bindings?

Reminds me of "The fall and rise of JavaScript"

Did you mean "The Birth and Death of Javascript":

https://www.destroyallsoftware.com/talks/the-birth-and-death...

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#75
post #52
post #50

Earlier quoted context omitted.

WASM has memory, and any native code compiled to WASM will allocate on WASM memory. CheerpJ's runtime is written in C++, which when compiled to WASM knows how to allocate memory, so there's no reason why direct buffers won't work.

Direct ByteBuffers are used to interop with the underlying platform, particularly for the purpose of IO. I could be wrong, but I fail to see how 'WASM memory direct Buffers' will work in that scenario.

Why don't you just try?

It seems to work fine:

https://javafiddle.leaningtech.com/#JYWwDg9gTgLgBAKwIYDckDoB...

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#77

If only we could get a new version of Java for the browser. Something more of a scripting language that is not compiled but interpreted. Could probably knock out a proof of concept in a week, might call it Javascript or something... In all seriousness, anything that spits out canvas for a simple textbox is completely misguided about what the web is.

> In all seriousness, anything that spits out canvas for a simple textbox is completely misguided about what the web is.

I suspect the goal is a way to bring Java desktop applications into the browser without rewriting the application from scratch.

Personally, as a fan of Blazor, I thought this was going to be a Java-based analog of Blazor; or a modernized replacement for GWT.

(One flavor of Blazor compiles C# to WASM, and uses a C# templating engine to generate HTML.)

Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers

#79

For anyone interested in the Kotlin side of things: Kotlin has a great compat with Kotlin/JS[0]. they also have Compose For Web which is more WASM based[1] though its marked as experimental [0]: https://kotlinlang.org/docs/js-overview.html [1]: https://github.com/Kotlin/kotlin-wasm-examples/tree/main/com...

kotlin is back on the menu! I love this language so much! I no longer use/need the JVM so i stopped using it, but with WASM comming, I might pick this language again
Post reply on HN