Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between groovy-all-*.jar and groovy-all-*-indy.jar

Tags:

groovy

What is actually the difference between these two files, groovy-all-2.2.1.jar and groovy-all-2.2.1-indy.jar, available in the GROOVY_HOME\embeddable directory?

I have not used the indy file so far and I am curious to know what it is used for.

Thanks!

like image 846
user955732 Avatar asked Nov 28 '13 15:11

user955732


1 Answers

The indy jar is a Java 7 compiled version of groovy with support for the new InvokeDynamic bytecode.

From the Invoke Dynamic pages here:

Since Groovy 2.0, we added support for the JVM invokedynamic instruction. This instruction is supported since Java 7 and is a new bytecode instruction in the JVM that allows easier implementation of dynamic languages. This instruction will also be used internally, by the JVM, for the upcoming lamdba support in Java 8.

This means that unlike APIs, AST transformations or syntactic sugar, this feature is not visible to the developer or the end user. It is a compilation and runtime feature only

like image 73
tim_yates Avatar answered Sep 29 '22 12:09

tim_yates