I have been programming in Java for several months, one of the tools I use is Eclipse, which seems to be able to run standalone from any local Java installation by having the JDK/JRE in a directory next to the main binary.
I have run it from my USB-drive in computers without any Java Runtime/Framework/other... And it has been able to open itself, understand the Java code, compile it, and run it without any problem.
So, the question is How do they do it?. At least in the Windows version (Did not try in the Linux version but I think it might work as well).