←back to thread

78 points pjmlp | 2 comments | | HN request time: 0.018s | source
Show context
jakozaur ◴[] No.46189809[source]
Not sure if I get this: WASM lets you use any language in the browser, though it still works way better with languages without GC, such as Rust or a transpiling C engine. Java is unlikely to be the best choice.

In the era of LLM assistants like Claude Code, any engineer can write frontend code using popular stacks like React and TypeScript. This use case is when those tools shine.

replies(1): >>46189916 #
another_twist ◴[] No.46189916[source]
Java running in the browser is unlikely as typescript has largely tamed the mess of Javascript. Java requires a JVM and shipping an entire JVM so its runs atop another VM is kinda redundant. Except if JVM itself gets compiled and cached as a WASM bundle and Java compilers start accept WASM-JVM as a target. That will just be distraction tbh, Java has its strength in large scale systems and it should just focus on those rather than get caught up in Frontend's messy world.
replies(2): >>46190086 #>>46190136 #
jeroenhd ◴[] No.46190086[source]
The article literally links to a frontend that does just that, run the JVM on top of WASM. It performs fine: https://teavm.org/gallery.html

I'm not sure if I'd use it for a website or anything, but if my goal was to embed a simulation or complex widget, I wouldn't ignore it as an option.

replies(1): >>46190149 #
1. bloppe ◴[] No.46190149[source]
It doesn't run the JVM. It's an ahead-of-time compiler that converts Java bytecode to wasm.
replies(1): >>46190341 #
2. jeroenhd ◴[] No.46190341[source]
Oh, if you want a full fat JVM, then you want CheerpJ https://cheerpjdemos.leaningtech.com/SwingDemo.html#demo

Takes a few seconds longer to load because it loads all of Java Spring, but it still performs just fine on my phone (though the lack of on screen keyboard activation makes it rather unfortunate for use in modern web apps).