TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required

60 pointsby TeaVMFan5 months ago

10 comments

TeaVMFan5 months ago
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:&#x2F;&#x2F;teavm.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;teavm.org&#x2F;</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:&#x2F;&#x2F;frequal.com&#x2F;Flavour&#x2F;book.html" rel="nofollow">https:&#x2F;&#x2F;frequal.com&#x2F;Flavour&#x2F;book.html</a> ) and more projects listed here: <a href="https:&#x2F;&#x2F;www.frequal.com&#x2F;TeaVM&#x2F;TeaVmBasedSites.html" rel="nofollow">https:&#x2F;&#x2F;www.frequal.com&#x2F;TeaVM&#x2F;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:&#x2F;&#x2F;renato.athaydes.com&#x2F;posts&#x2F;comparing-jvm-alternatives-to-js.html" rel="nofollow">https:&#x2F;&#x2F;renato.athaydes.com&#x2F;posts&#x2F;comparing-jvm-alternatives...</a>
评论 #42420374 未加载
shannah785 months ago
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&#x27;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 &quot;proper&quot; threads weren&#x27;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&#x27;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&#x27;s solution for supporting threads, was truly a piece of genius. Had he not created TeaVM, and added threading support, I don&#x27;t think we would have ended up with our web port - or, at the very least it wouldn&#x27;t have ended up performing nearly as well.
评论 #42424995 未加载
RyanHamilton5 months ago
For those looking a way to run java console apps in the browser, check out doppio: <a href="https:&#x2F;&#x2F;plasma-umass.org&#x2F;doppio-demo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;plasma-umass.org&#x2F;doppio-demo&#x2F;</a> it&#x27;s old and unmaintained but it works. For example I run the java H2 database online: <a href="https:&#x2F;&#x2F;www.timestored.com&#x2F;data&#x2F;h2-database-online&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.timestored.com&#x2F;data&#x2F;h2-database-online&#x2F;</a> which allows me to try disposable SQL queries in my browser.
评论 #42424207 未加载
jurmous5 months ago
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.
评论 #42422437 未加载
评论 #42422552 未加载
seinecle5 months ago
Love the concept but no clear idea of a use case.<p>Could you list 3 or 4 of them please?
评论 #42422538 未加载
评论 #42422517 未加载
评论 #42423960 未加载
评论 #42422574 未加载
评论 #42422621 未加载
评论 #42422469 未加载
LoveMortuus5 months ago
I&#x27;m sorry if this is a dumb question, I don&#x27;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?
sebazzz5 months ago
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.
worik5 months ago
Ironic, given Java Applets were going to run in browsers
评论 #42422465 未加载
Alifatisk5 months ago
Does it support JavaFX applications aswell, that would be very cool? Last time I had to recreate a project in Flutter.
评论 #42423211 未加载
评论 #42424642 未加载
pjmlp5 months ago
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
评论 #42422650 未加载
评论 #42422783 未加载
评论 #42422793 未加载