Comment by zb3

Comment by zb3 5 hours ago

1 reply

Thanks :D

I'm not sure what you meant by that standard hotspot - it can run on java 8 (in my case I use openjdk) albeit it uses the ASM library to modify class bytecode (a custom classloader, used for things like loading resources) and importantly, there are JNI native parts.

I'm not an iOS developer, so I can't help here, but my ultimate plan was to make it run.. on the web! Unfortunately this is not feasible since it'd require a custom webgl-based m3g and mascot capsule v3 implementation.. also CheerpJ is said to be too slow. But technically you can run the "freej2me-plus" fork (no natives but no 3d support) on the web via CheerpJ (I hope that works on iOS)

lxgr 2 hours ago

What I meant by "standard Hotspot" is Oracle/OpenJDK's standard JVM – I believe it only works using JIT compilation these days, and therefore can't run on iOS (since Apple doesn't allow any third-party JIT).

There does seem to be an "interpreted only" mode [1], but obviously that by itself does not make an OpenJDK port for iOS feasible either.

> but my ultimate plan was to make it run.. on the web!

WASM would actually be an interesting path to get a J2ME emulator to iOS! I believe WASM code generation at runtime might be the closest thing on iOS you could get to JIT on iOS from a performance point of view (since the iOS WASM implementation itself compiles to native code, I believe).

[1] https://docs.oracle.com/en/java/javase/11/tools/java.html#GU...