Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.5
    • Fix Version/s: None
    • Component/s: Launcher
    • Labels:
      None
    • Environment:
      Windows, jruby-launcher (tree:b774fec/2010-03-01)
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      -r and -I options allow optional white spaces. But JRUBY-4611 fix has new bug.


      jruby.exe -r bar -J-verbose foo.rb

      generates

      jruby: unknown option -J-verbose

      In contrast, the following commands work.

      jruby.exe -r bar foo.rb
      jruby.exe -J-verbose -r bar foo.rb

      The following commands work, of course.

      jruby.exe -rbar -J-verbose foo.rb
      jruby.exe -J-verbsee -rbar foo.rb
      jruby.exe -rbar foo.rb

      The fix stops scanning for options from 'bar' because 'bar' does not start with '-', and jruby does not recognize JVM option -J.

        Activity

        Hide
        Vladimir Sizikov added a comment -

        Not sure how to handle that without teaching JRuby launcher all ruby command line options though... Well, oun bash launcher does try to be a bit more clever than native launcher and recognizes some of the typical ruby options and knows when they allow optional white space. Probably we should do the same for native launcher.

        For now, as a rule of thumb: always specify JVM options at the beginning.

        Show
        Vladimir Sizikov added a comment - Not sure how to handle that without teaching JRuby launcher all ruby command line options though... Well, oun bash launcher does try to be a bit more clever than native launcher and recognizes some of the typical ruby options and knows when they allow optional white space. Probably we should do the same for native launcher. For now, as a rule of thumb: always specify JVM options at the beginning.
        Hide
        Kim, Jongsu added a comment - - edited

        I found the issue when using Eclipse with JRuby on Windows, which prepends the following command line options before my options.
        -KU -I /some/dirs -r /some/dltk/sync.rb

        I worked around the issue by setting JAVA_OPTS environment variable.
        set JAVA_OPTS=-verbose

        Show
        Kim, Jongsu added a comment - - edited I found the issue when using Eclipse with JRuby on Windows, which prepends the following command line options before my options. -KU -I /some/dirs -r /some/dltk/sync.rb I worked around the issue by setting JAVA_OPTS environment variable. set JAVA_OPTS=-verbose
        Hide
        Kim, Jongsu added a comment -

        Eclipse DLTK Ruby team fixed the issue by passing-r option without an intervening space.

        Show
        Kim, Jongsu added a comment - Eclipse DLTK Ruby team fixed the issue by passing-r option without an intervening space.
        Hide
        Charles Oliver Nutter added a comment -

        I would be surprised if we have not fixed this by now, but reopen if it's still a problem.

        jruby-launcher should basically be scanning all arguments and removing -J options from the list, regardless of where they show up. It works fine on UNIX, so probably works on Windows as well (same logic).

        Show
        Charles Oliver Nutter added a comment - I would be surprised if we have not fixed this by now, but reopen if it's still a problem. jruby-launcher should basically be scanning all arguments and removing -J options from the list, regardless of where they show up. It works fine on UNIX, so probably works on Windows as well (same logic).

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Kim, Jongsu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: