Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-1
-
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.