Is it possible to run a .lua file, or a .jar file?

Also, "When it gets something", when it gets what? There is no way, with Arduino (that I know of so far) that would allow me to send something that would be detectable. For instance, if Arduino was able to create a file, I could loop until a file is detected then execute code. But then again, Arduino can't do this.

What should be done on the Arduino team's part is to create a function that can interact with your computer (as simple as os.execute(), or system() (in C), instead of inefficiently having to do it through other programming languages.