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

startGroovy.bat appends CLASSPATH to jvm's startup classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.5.4, 1.5.5
    • 1.5.6, 1.6-beta-1
    • 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

      Attachments

        Activity

          People

            paulk Paul King
            antti.karanta@napa.fi Antti Karanta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: