CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
101–110 of 179 posts
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#102With 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?
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#103If 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 WAS…
A Java option for modern web apps exists, and it's called Flavour: https://flavour.sourceforge.io/
* Build SPAs in Java with HTML templates and components
* Fast build times and batteries-included build framework
* Easy calls to Java web services, just invoke a method and Flavour handles marshalling and unmarshalling, you just see/use Java objects.
* Full-stack refactoring
* Built on TeaVM, so you get the all the benefits of a mature, performant framework with support for threads and multiple JVM languages (bytecode-based transpilation).
TeaVM vs Blazor comparison chart: https://frequal.com/java/TeaVmVsBlazorChart.html
TeaVM longer comparison with Blazor: https://frequal.com/java/TeaVmVsBlazorWasm1-0.html
Java Magazine article on Flavour and TeaVM: https://blogs.oracle.com/javamagazine/post/java-in-the-brows...
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#104This is pretty awesome technically. Java everywhere without a JVM install. What's its footprint?
TeaVM has become even smaller and faster since that article was published. The test suites are here in case someone wants to conduct a rematch: https://github.com/renatoathaydes/jvm-alternatives-to-js
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#105Earlier quoted context omitted.
Probably depends on what you are optimizing for. If this metric is an app startup time then AOT is super beneficial and always beats JIT without strings attached.
Well yeah, but that’s hardly a metric for performance.
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#106Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#107Earlier quoted context omitted.
> 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 WAS…
Agreed that many people will want to build true web single-page apps, not port Swing to the web in a Canvas. A Java option for modern web apps exists, and it's called Flavour: https://flavour.sourceforge.io/ * Build SPAs in Java with HTML templates and components * Fast build times and batteries-included build framework * Easy calls to Java web services, just invoke a method and Flavour handles marshalling and unmars…
Blazor has the full task API. Asynchronous tasks run just like Javascript promises.
Does TeaVM have true threading, or is it emulating threads via some higher-level concept? (IE, if I have a multicore CPU, will TeaVM take advantage of multiple cores?)
Unless you're trying to do true CPU-intense parallel computing inside the browser, where you need the power of real CPU-level concurrency, "real threads" in the browser has no gain over the task API.
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#108Related, if you like Java but want to create a modern, Lighthouse-ready web app, check out Flavour: https://flavour.sourceforge.io/
What is Lighthouse in this context?
TeaVM apps score quite well on Lighthouse. Previous iterations of CheerpJ had challenges in startup time and download size. Results here: https://renato.athaydes.com/posts/comparing-jvm-alternatives...
For a concrete test, try launching this full TeaVM/Flavour 5-letter word game, it downloads in https://frequal.com/wordii/
Re: CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
#109For 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
#110With 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?
anyone remember dhtml, which allowed adding powerpoint-like transitions to hyperlinks?
The first, real uses cases for XMLHttpRequests was sending chunks of HTML over the wire and updating the DOM via JavaScript - so “Dynamic HTML”