Maybe you're writing a Java program, and you need to do a quick one-off script to clean up your database. You could write it in Java, but that can involve a lot of overhead for a quick script.
You could write it in an outside scripting language or maybe you write a servlet, and the requirements are changed quickly. Then use Jython, which is a complete re-implementation of the Python programming language, written in 100 percent pure Java, which runs on any Java Virtual Machine (JVM).
Click here to know more..!