Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.5.4, 1.5.5
-
None
-
None
Description
startGroovy.bat appends CLASSPATH to jvm's startup classpath. This is unnecessary as it seems to be taken care of groovy anyway (native launcher does not add contents of CLASSPATH to jvm startup classpath and it scripts started w/ it still seem to find stuff on CLASSPATH).
If groovy's classloader first delegates to system classloader, this may cause classloading problems if a class on the CLASSPATH (which is loaded by system classloader) tries to load a class known to groovy's classloader.
Here's an easy way of seeing the contents of CLASSPATH on system classpath:
C:\programs\Java\Groovy-1.5.4>set CLASSPATH=helloworld.jar
C:\programs\Java\Groovy-1.5.4>bin\groovy.bat -e "println System.getProperty('java.class.path')"
C:\Programs\Java\Groovy-1.5.4\lib\groovy-1.5.4.jar;helloworld.jar
C:\programs\Java\Groovy-1.5.4>bin\groovy.exe -e "println System.getProperty('java.class.path')"
C:\programs\Java\Groovy-1.5.4\lib\groovy-1.5.4.jar