I have a simple java application that gets jmx connection url, object name and attribute name as inputs and outputs attribute value. This application runs hundreds of times every minute and has strict running time limitations. Recently many corner cases appeared (converting milliseconds to seconds, folding a list, etc.) and recompiling and redistributing this application becomes tedious. So i've decided to switch to some scripting language with support for JMX.
I've tried groovy, jython and clojure and found that their initialization time is lengthy (around 0.9/1.2/3.5 for groovy/clojure/jython).
Is there anything with faster initialization speed or is there a way to decrease initialization time of these laguages without loading them from java?
I have found a solution that should work across all java scripting languages it is nailgun. It has the same principle as jerk and cake suggested in other answers but it runs arbitary java classes.
This blog post has a great instruction on how to run jython scripts with nailgun and i am sure it can be applied to other scripting languages.