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

wrong algorithm in _jrubyvars.bat to set the classpath for jruby

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.0.1
    • Fix Version/s: JRuby 1.0.2, JRuby 1.1b1
    • Component/s: None
    • Labels:
      None
    • Environment:
      windows
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      _jrubyvars.bat batch is broken on windows, it does not only add the jars in jruby/lib directory but all jars located in sub directories.

      this is inconsistent with unix platforms and create issues with glassfish v3 integration.

      if you replace

      for /r "%JRUBY_HOME%\lib" %%i in (*.jar) do @call "%~dp0_jrubysetcp" %%i
      with
      for %%i in ("%JRUBY_HOME%\lib"*.jar) do @call "%~dp0_jrubysetcp" %%i

      in _jrubyvars.bat

      it works as expected...

        Issue Links

          Activity

          Hide
          Matthew Foemmel added a comment -

          JIRA keeps eating my backslashes - trying again:

          for %%i in ("%JRUBY_HOME%\lib
          *.jar") do @call "%~dp0_jrubysetcp" %%i

          Show
          Matthew Foemmel added a comment - JIRA keeps eating my backslashes - trying again: for %%i in ("%JRUBY_HOME%\lib *.jar") do @call "%~dp0_jrubysetcp" %%i
          Hide
          Matthew Foemmel added a comment -

          Fourth time's the charm:

          for %%i in ("%JRUBY_HOME%\lib\*.jar") do @call "%~dp0_jrubysetcp" %%i
          Show
          Matthew Foemmel added a comment - Fourth time's the charm: for %%i in ("%JRUBY_HOME%\lib\*.jar") do @call "%~dp0_jrubysetcp" %%i
          Hide
          Charles Oliver Nutter added a comment -

          Yep, it was just a typo in the original fix. I've committed the updated fix on both branches.

          Show
          Charles Oliver Nutter added a comment - Yep, it was just a typo in the original fix. I've committed the updated fix on both branches.
          Hide
          Kaj Hejer added a comment -

          In trunk (rev 5511) I now get

          $ jruby -version
          Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main

          I'm on osx 10.5.1 and java 1.5.0_13-b05-237

          Show
          Kaj Hejer added a comment - In trunk (rev 5511) I now get $ jruby -version Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main I'm on osx 10.5.1 and java 1.5.0_13-b05-237
          Hide
          Charles Oliver Nutter added a comment -

          Kaj: that seems like you just need a rebuild or jruby.jar is missing. Either way it is unrelated to this bug. If you can still reproduce it after a clean build and your ENV looks ok please file a bug or contact us on freenode IRC in #jruby.

          Show
          Charles Oliver Nutter added a comment - Kaj: that seems like you just need a rebuild or jruby.jar is missing. Either way it is unrelated to this bug. If you can still reproduce it after a clean build and your ENV looks ok please file a bug or contact us on freenode IRC in #jruby.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Jerome Dochez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: