Could the Java Runtime be compiled for the Web, given the ability to translate Java bytecode to WebAssembly, and run Java VM from the browser, not in an widely unsupported applet? I know there is a alternative that is both easier and faster than this (JWebAssembly), but this is more about the principle than the application. I am just curious if this could happen.
This question has some significant parallels with how you can run C# within the browser using WebAssembly. Both Java & C# run within their own virtual machine, the JRE and .Net CLR respectively.
In order to run C# within WebAssembly, the Blazor project took one of the open source CLR implementations and compiled it to WebAssembly. This allows C# DLLs to run within the browser.
Exactly the same solution could be used to run Java in the browser, however, a key to this would most likely be finding a suitable open source JRE implementation that can be compiled to WebAssembly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With