Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1179

GroovyScriptEngine does not let you specify parent ClassLoader for GroovyClassLoader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-JSR-5
    • None
    • None

    Description

      When the GroovyScriptEngine creates a new GroovyClassLoader it always uses its classloader as the parent ClassLoader of the GroovyClassLoader. It should be possibly to specify the ClassLoader that will be used as the parent ClassLoader for new GroovyClassLoader objects when a script is run. This is necessary because a script may refer to classes/methods that don't exist on the JVM classpath. In this case, it's necessary to provide a customized URLClassLoader to allow for the script to run.

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            buko.obele@gmail.com Bo
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: