You seem you pretend to know it all, yet you to don't know anything. Not only MAME would need to translate opcodes to the architecture MAME is running on for every emulated processor, they would need to build their own compiler for every platform.
Do you get the idea?, trying to emulate anything and also working on specific compilers (and decompilers) so your static compiled code can run on Mac, Linux and Windows? It's unmaintainable (let alone portable). Why bother using compilers like GCC when it's easier for everyone to make their own? (sarcasm).
And seriously, are you involving Java into this? A platform which compiles source code (different to opcodes which need to be decompiled first) into Java bytecodes generated by themselves? Of course it's easy for them, they know their own code. That doesn't stop the fact they have to make a compiler and an interpreter for every platform Java is working on.
MAME cares for emulation (but mostly hardware documentation) which is a huge task alone.