4 ms·
This is pretty awesome technically. Java everywhere without a JVM install. What's its footprint?
by mannyv 3y ago
This is pretty awesome technically. Java everywhere without a JVM install. What's its footprint?
- jasmer 3y agoYeah it's not really JVM. The thing with these kinds of ports is that they do some 'neat stuff' but ultimately, they don't come close to the real thing, often, not close enough to be a material substitute. The JVM is a very sophisticated and nuanced thing, 'duplicating it' and the standard libs is a very big deal. Theses are cool projects though and they have their use.
- brabel 3y agoIt is absolutely a real JVM. From the link: "CheerpJ is based on an unmodified OpenJDK environment, guaranteeing the same behavior on the browser compared to a native JVM. It includes many emulation layers to ensure Filesystem, Networking, Printing, Clipboard and many other subsystems work seamlessly." Did you actually manage to find anything that works in OpenJDK but not in CherpJ 3.0?
- jasmer 3y agoDirect buffers? I mean, they're going to be 'virtual direct'? Or can I can't fathom how but I would imagine they're not going to be 'actually direct'.
- brabel 3y agoWASM has memory, and any native code compiled to WASM will allocate on WASM memory. CheerpJ's runtime is written in C++, which when compiled to WASM knows how to allocate memory, so there's no reason why direct buffers won't work.
- jasmer 3y agoDirect ByteBuffers are used to interop with the underlying platform, particularly for the purpose of IO. I could be wrong, but I fail to see how 'WASM memory direct Buffers' will work in that scenario.
- lxgr 3y agoWhat IO devices would you even have access to from a browser sandbox?
- jasmer 3y agoWhat app is going to function without IO?
- pjmlp 3y agoA CPU warmer. :)
- jasmer 3y agoExactly. These 'ports' are more intellectually exciting than the are pragmatically useful, but they definitely can be useful, it's a matter of having the right product parameters around what they are good for and what not. This is really an exercise in engineering thinking vs. product or 'solution oriented' thinking. You can usually tell where people's heads are at by how they react to these kinds of things. Should note that 'people doing stuff because' is a core part of organic development, most things would not exist without that ethos floating around.
- lxgr 3y agoHave you looked at the vendor’s website? This doesn’t strike me as a purely academic/intellectual "because we can" project at all. And you still haven’t explained in any way why the lack of DirectBuffers or "IO" is a disqualifier for being able to run legacy applets in a modern browser without a JRE or other plugins.
- TeaVMFan 3y agoA while back CheerpJ had a huge footprint and terrible startup time compared to TeaVM: https://renato.athaydes.com/posts/comparing-jvm-alternatives-to-js.html https://renato.athaydes.com/posts/comparing-jvm-alternatives... 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 https://github.com/renatoathaydes/jvm-alternatives-to-js