JSR-223 vs JSR-241 - Scripting language

1.1k views Asked by At

What is main difference between JSR-223 and JSR-241?

If I understood correctly:

  1. JSR -223: introduces a scripting language engine in Java, thats it! You are free to use whatever scripting language you wants, for ex: Groovy, Mozilla Rhino, PHP, Jython, Python etc. Default implementation of J2EE supports JavaScript as scripting engine, but you can add any scripting language you like. So this was simply to connect the Classes written in Java language with piece of code written in Scripting language (or vice-versa). The only benefit of this integration, I could see is simplicity offered by scripting language in writing a program as compared to writing the same program in Java.

  2. JSR 241: This is extension of JSR-223 and emphasize on adopting Groovy as scripting language, i.e. If you're planning to use scripting language in your Java application (Web or Dekstop apps), use Groovy.. leave others, because Groovy is more Java like and other scripting languages like Jython, Python, JavaScript etc have been adopted and modified to suit Java, but natural choice is Groovy.

Could you please throw some more light on this, and Is my understanding correct?

1

There are 1 answers

0
Michael Borgwardt On BEST ANSWER

JSR 241 is not an extension of JSR 223, nor does it "emphasize on adopting Groovy". Instead, its main focus is making Groovy (i.e. its syntax and semantics) an official Java standard in the first place.

The only thing it has to do with JSR 223 is that it's mentioned in 2.6 to clarify why the proposal is not already covered by JSR 223: