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

GroovyClassloader doesn't use CompilerConfiguration for classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-1
    • 1.0-JSR-3
    • groovy-jdk
    • None
    • Linux, JDK 1.5.0

    Description

      I'm looking to try and pass a classpath into GroovyClassLoader and found little documentation, so I looked at the source and found that while you can set a classpath on the CompilerConfiguration object that you pass to GroovyClassLoader the classpath specified in the configuration object is not actually used by the classloader. Instead it always looks at the system property java.class.path. See GroovyClassLoader.getClassPath(), line 380, and note that searchPaths is not assigned anywhere else. This makes it rather difficult to change the path that is searched by such a classloader.

      This should be rather trivial to fix and would make things easier to debug and more consistent.

      Attachments

        Activity

          People

            franck_rasolo Franck Rasolo
            jpschewe Jon Schewe
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified