Remix.run Logo
another_twist 3 days ago

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.

jeroenhd 3 days ago | parent | next [-]

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.

bloppe 3 days ago | parent [-]

It doesn't run the JVM. It's an ahead-of-time compiler that converts Java bytecode to wasm.

jeroenhd 3 days ago | parent [-]

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).

eru 3 days ago | parent | prev [-]

> 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.

Multiple people can work on different things in the Java ecosystem.

Compiling Rust to WASM doesn't really distract anyone from compiling Rust to x86 or ARM, either.