This is probably not the correct place to post this question. If you have any other suggestions where I should post this, they are welcome.
What I wonder about is if there are some libraries/tools/framework available for creating a runtime environment/virtual machine (mostly from scratch)? That is, a common framework where different structures like a stack and heap, etc are already implemented. It should be possible to define and realise a new instruction set. (Preferably in Java.)