JVM was originally designed for set top boxes (STB) I believe, the problem there being a variety of architectures, thus a Virtual Machine solved the problem of write code to the virtual machine and not the physical machine and applications could run on various STB's.
OpenTV provided such a 'middleware' where the main language was C on such a VM, and was (possibly still is) widely used.