The new release of TeaVM (0.11.0) now supports WebAssembly GC. This increases performance while further decoupling TeaVM apps from ECMAScript.<p>TeaVM ( <a href="https://teavm.org/" rel="nofollow">https://teavm.org/</a> ) is an Apache-licensed project, free for use in commercial projects. It is mature and used widely, including in frameworks like Flavour ( <a href="https://frequal.com/Flavour/book.html" rel="nofollow">https://frequal.com/Flavour/book.html</a> ) and more projects listed here: <a href="https://www.frequal.com/TeaVM/TeaVmBasedSites.html" rel="nofollow">https://www.frequal.com/TeaVM/TeaVmBasedSites.html</a><p>TeaVM compiles Java code to run in the browser, efficiently and quickly. It features short build times, small downloadable files, and a batteries-included toolset (including minification, tree-shaking, and packaging). Previous releases have conquered all similar open-source tools (that support threading) in independent testing: <a href="https://renato.athaydes.com/posts/comparing-jvm-alternatives-to-js.html" rel="nofollow">https://renato.athaydes.com/posts/comparing-jvm-alternatives...</a>
A little over 10 years ago, I ran across TeaVM for the first time (probably) on GitHub. We had been looking for a way to port Codename One to the web, but we needed thread support, which wasn't supported by any existing solutions.<p>I emailed Alexey (the creator of TeaVM) to ask if he had plans for thread support, and he replied that, while "proper" threads weren't possible, he had some ideas for supporting green threads. Over the following 6 months or so, Alexey would share updates on progress he had made on the thread front. In March 2015, he shared that he had found a new approach for async code that wouldn't affect the performance of single-threaded code, and would support natural stack traces.
We released a preview of our web port using TeaVM a month later, and it exceeded all of our expectations, both in how easy it ended up being to do the port (because of TeaVM), and on the performance.<p>Alexey's solution for supporting threads, was truly a piece of genius. Had he not created TeaVM, and added threading support, I don't think we would have ended up with our web port - or, at the very least it wouldn't have ended up performing nearly as well.
For those looking a way to run java console apps in the browser, check out doppio: <a href="https://plasma-umass.org/doppio-demo/" rel="nofollow">https://plasma-umass.org/doppio-demo/</a> it's old and unmaintained but it works. For example I run the java H2 database online: <a href="https://www.timestored.com/data/h2-database-online/" rel="nofollow">https://www.timestored.com/data/h2-database-online/</a> which allows me to try disposable SQL queries in my browser.
I am more enthusiastic with Kotlin also compiling to wasm with Jetpack compose and now working in all major browsers. It provides a full modern UI framework and also compiles to mobile and desktop. Code is also usable on server and if using the JVM fully interoperable with Java.
I'm sorry if this is a dumb question, I don't really know a lot about this field.<p>Would this allow me to play Puzzle Pirates (a Java game) in the browser, or would the developers still need to do some work for the game to be actually playable in the browser?
Would be cool if it had applet support. There used to be a very cool physics website, with all concepts explained using simulations running in Java Applets. Lost forever.
Love the revenge of plugins.<p>We might have lost a decade since Unreal was running on Flash Crossbridge, yet thanks to Web trying to be a app platform to replace native apps, we are back full circle.<p>Java, .NET have their plugins back, even if with additional turtles along the stack, and stuff like Flutter are the new Flash.<p>I guess, thanks to all WebGL, WebGPU and WebAssembly folks