0

I was reading the groovy doc about integrating groovy into applications.

From the paragraph 2. Bean Scripting Framework I can read

The Bean Scripting Framework is an attempt to create an API to allow calling scripting languages from Java. It hasn’t been updated for long and abandoned in favor of the standard JSR-223 API.

From the paragraph 3. JSR 223 javax.script API I can read

SR-223 is a standard API for calling scripting frameworks in Java. ... Groovy provides its own richer integration mechanisms, and if you don’t plan to use multiple languages in the same application, it is recommended that you use the Groovy integration mechanisms instead of the limited JSR-223 API.

Is the Bean Scripting Framework the Groovy integration mechanisms from the second quote ? If so it seems there is an infinite loop. Did I misunderstand something ? Is this a doc problem ? Which one should I use ?

2
  • What are you trying to do? Commented Nov 17, 2015 at 17:26
  • I want to write a (groovy) DSL so that less technical peoples can write scripts which will be executed from a java (android in reality) library. Because I'm new to groovy and in order to check if it is possible, I was reading the doc, but this two subsections seem opposite Commented Nov 17, 2015 at 20:22

1 Answer 1

1

Is the Bean Scripting Framework the Groovy integration mechanisms from the second quote ?

No, this means one of GroovyScriptingEngine, GroovyShell, Eval, GroovyClassLoader or direct usage of CompilationUnit ( the compiler core basically). Which one to use depends on your use case. For most cases GroovyShell works out.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.