I did not know of a Java port, but this reminds me there is some kind of JavaScript-based environment for DOS that I see linked now and then (think it is bundled with FreeDOS?). Probably this one:
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.
Perhaps you are only confused about being confused. Called JavaPC. It cost money and I don’t think it sold well, maybe you were the only customer. There was also a DOS port of Kaffe called KaffePC.
https://web.archive.org/web/20000613171121/http://www.sun.co...
KaffePC sounds very familiar, could be it!
https://web.archive.org/web/20011206153449/http://www.openje...
Wow I thought it was gone, but it's still available
Googling about I found http://www.delorie.com/djgpp//mail-archives/browse.cgi?p=djg...
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.
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.