I was trying to find this JVM recently and couldn't find any trace of its existence which makes me wonder if I imagined or got confused about the whole thing.
https://github.com/SuperIlu/DOjS
"DOjS is a JavaScript programming environment for systems running MS-DOS, FreeDOS or any DOS based Windows (like 95, 98, ME). It features an integrated editor, graphics & sound output, mouse/keyboard/joystick input and more"
Never tried it.
https://web.archive.org/web/20000613171121/http://www.sun.co...
Wow I thought it was gone, but it's still available
I'd imagined there might be a port of one of the PalmOS-targeted JVM-alikes (eg SuperWaba) but it doesn't look like any of them made it back to DOS. I could also imagine someone getting an OS/2 or Windows JVM running under a DOS extender.
https://github.com/o8vm/rust_dos
Not sure what the approach would be for them to expand that to support segments.
In DJGPP there are macros to allow your protected mode application access physical real-mode addresses (like when you want to write to video RAM). I don't know if IA-16 also does something like that, or if they added far/near keywords to the language like old 16-bit C compilers did (at least the ones I used).
Free Pascal has helper-functions to work with segment+offset pointer pairs, also without having to modify the language itself. I think that would work well enough in C, but I guess the old method of adding non-standard keywords was seen as slightly more convenient.
Anyone interested in compiling for DOS (32-bit or 16-bit) should also check out Free Pascal.