I'm working on designing a group of Java programs that I hope to turn into a Java-based OS someday. Until I get a kernel working, I want to just run them on top of a Linux system (I'm using Ubuntu, if that matters). Because of this, I need all filesystem calls directed to a different directory in my home folder, so accessing /
from within Java would actually access /home/<user>/Thunderbolt/
.
I basicly need the same thing as in this question, and also this question, but for Java.
I've seen stuff about chroot
, and I think this might work, but I have no idea how to get it to work with Java. I don't need to worry about security at all, I just need the different fake filesystem.
Also, the core Java libraries need to be accessed without having to copy them into the fake filesystem.
Is this possible, and if so, how do I set it up?