Is it possible to compile Java-code when running a Java-program?
In essence, my situation is thusly: I have a bunch of objects that all have their various values. Each object also react to different things, but not all objects should react the same to everything. This basically leaves me with two possibilities: Either code a scripting language that can be executed at runtime, or hardcode all the various reactions. The first is time-consuming and not as fast as compiled code, and the second is far too static for my liking. Is there a way to write Java-code along with the text-file I read for each object and have that Java-code compiled and put to use?