For compiled languages (which is Java and C#, for example) :BEGIN_EXT_INTERPRETER method probably will not work.
possibly you can create a seperate job/Workflow that takes the Script content (e.g. as script variable), creates a file, compiles it and executes it....