JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-1350

CLASSPATH environment variable increases exponentially in _jrubyvars.bat

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.0.1
    • Fix Version/s: JRuby 1.0.2, JRuby 1.1b1
    • Component/s: Miscellaneous
    • Labels:
      None
    • Environment:
      Windows Vista
    • Number of attachments :
      0

      Description

      In _jrubyvars.bat, the value of CLASSPATH environment variable increases exponentially. This is a fragment from batch file:

      – cut here –
      if not "%CLASSPATH%" == "" goto gotCP
      set CLASSPATH=%CP%
      goto doneCP
      :gotCP
      set CLASSPATH=%CP%;%CLASSPATH%
      :doneCP
      – cut here –

      Each execution of this script increases the value of the CLASSPATH variable exponentially by appending from the previous run. If this script gets executed in a new shell, then everything works.

        Activity

        Hide
        Vladimir Sizikov added a comment -

        See also similar/related #JRUBY-1141.

        Inconvenient indeed.

        Show
        Vladimir Sizikov added a comment - See also similar/related # JRUBY-1141 . Inconvenient indeed.
        Hide
        Charles Oliver Nutter added a comment -

        We need help fixing this one. We're no good at bat/cmd scripting.

        Show
        Charles Oliver Nutter added a comment - We need help fixing this one. We're no good at bat/cmd scripting.
        Hide
        ruivaldo neto added a comment -

        This snippet works ?:

        ---------------------------------------------------------
        if not "%DEFINEDCP%" == "" goto doneCP

        if not "%CLASSPATH%" == "" goto gotCP
        set CLASSPATH=%CP%
        set DEFINEDCP=DEFINED
        goto doneCP

        :gotCP
        set CLASSPATH=%CP%;%CLASSPATH%
        set DEFINEDCP=DEFINED

        :doneCP
        ---------------------------------------------------------

        Show
        ruivaldo neto added a comment - This snippet works ?: --------------------------------------------------------- if not "%DEFINEDCP%" == "" goto doneCP if not "%CLASSPATH%" == "" goto gotCP set CLASSPATH=%CP% set DEFINEDCP=DEFINED goto doneCP :gotCP set CLASSPATH=%CP%;%CLASSPATH% set DEFINEDCP=DEFINED :doneCP ---------------------------------------------------------

          People

          • Assignee:
            Nick Sieger
            Reporter:
            Arun Gupta
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: