Java is capable of invoking external processes, and it's capable of dynamic class loading.

Theoretically you could create a .java file, invoke javac, and then dynamically load the resulting class...