groovy
  1. groovy
  2. GROOVY-2979

Cannot launch Groovy on Windows with MSYS

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows, MSYS
    • Number of attachments :
      0

      Description

      MSYS (Minimal SYStem) uses UNIX format paths but because the JDK requires DOS format JAVA_HOME must be in DOS format. startGroovy does not amend JAVA_HOME for MSYS (it does for Cygwin) before issuing the exec. THis leads to error messages such as:

      exec: /h/users/russel/Progs/OddsByLanguage/Gant/Test/C:\Program Files\Java\jdk1.6.0_06/bin/java: cannot execute: No such file or directory

      MSYS does not provide an equivalent oif cygpath, and cygpath cannot be assumed.

      Although marked as Minor, this is actually a blocking bug as it is impossible to run Groovy in this context/environment.

        Activity

        Hide
        blackdrag blackdrag added a comment -

        I guess we have to use that pattern:

        # For Mingw, ensure paths are in UNIX format before anything is touched
        if $mingw ; then
          [ -n "$XY" ] &&
            XY="`(cd "$XY"; pwd)`"
        fi
        
        Show
        blackdrag blackdrag added a comment - I guess we have to use that pattern: # For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then [ -n "$XY" ] && XY= "`(cd " $XY "; pwd)`" fi
        Hide
        Russel Winder added a comment -

        I guess so, though you probably want to loose the quotes around the $XY in the shell command.

        I tried

        JAVA_HOME=/c/Program\ Files/Java/jdk1.6.0_06 gant

        and that worked fine so it definitely is a "format of the environment variable" problem.

        Show
        Russel Winder added a comment - I guess so, though you probably want to loose the quotes around the $XY in the shell command. I tried JAVA_HOME=/c/Program\ Files/Java/jdk1.6.0_06 gant and that worked fine so it definitely is a "format of the environment variable" problem.
        Hide
        blackdrag blackdrag added a comment -

        Say Russel, since you can confirm if it works or not, could you make a change to the repository fixing that? I am currently without any windows, so I can't install MinGW to test this. Also I think you made comparable changes in gant already.

        Show
        blackdrag blackdrag added a comment - Say Russel, since you can confirm if it works or not, could you make a change to the repository fixing that? I am currently without any windows, so I can't install MinGW to test this. Also I think you made comparable changes in gant already.
        Hide
        Russel Winder added a comment -

        I added the line to startGroovy in 1.5.x, 1.6.x and trunk.

        It appears to work on my VirtualBox set up.

        If this is acceptable then we can mark this as resolved.

        Show
        Russel Winder added a comment - I added the line to startGroovy in 1.5.x, 1.6.x and trunk. It appears to work on my VirtualBox set up. If this is acceptable then we can mark this as resolved.
        Hide
        Guillaume Laforge added a comment -

        Thank you very much Russel.

        Could we have someone with a windows machine try this please? Anyone?

        Show
        Guillaume Laforge added a comment - Thank you very much Russel. Could we have someone with a windows machine try this please? Anyone?
        Hide
        Daniel.Sun added a comment -

        Daniel@icbc-2fe2d9ca66 ~
        $ groovy -v
        Groovy Version: 1.7-beta-1-SNAPSHOT JVM: 1.6.0_10

        Daniel@icbc-2fe2d9ca66 ~
        $ groovysh
        Groovy Shell (1.7-beta-1-SNAPSHOT, JVM: 1.6.0_10)
        Type 'help' or '\h' for help.
        ------------------------------------------------------------
        groovy:000>

        It seems that groovy 1.7-beta-1-SNAPSHOT(20081129090202) works well within Cygwin.

        Show
        Daniel.Sun added a comment - Daniel@icbc-2fe2d9ca66 ~ $ groovy -v Groovy Version: 1.7-beta-1-SNAPSHOT JVM: 1.6.0_10 Daniel@icbc-2fe2d9ca66 ~ $ groovysh Groovy Shell (1.7-beta-1-SNAPSHOT, JVM: 1.6.0_10) Type 'help' or '\h' for help. ------------------------------------------------------------ groovy:000> It seems that groovy 1.7-beta-1-SNAPSHOT(20081129090202) works well within Cygwin.
        Hide
        blackdrag blackdrag added a comment -

        but this issue is about MSYS

        Show
        blackdrag blackdrag added a comment - but this issue is about MSYS
        Hide
        Russel Winder added a comment -

        Appears to be working, just needs some more reports before being closed.

        Show
        Russel Winder added a comment - Appears to be working, just needs some more reports before being closed.
        Hide
        Russel Winder added a comment -

        Daniel,

        This issue is solely about the MSYS problem, which I think is now fixed – at least the most obvious aspect of the problem is. The Cygwin problem I am reporting is GROOVY-3209. Basically the Cygwin execution of the Posix script fails on Windows XP running in VirtualBox on Ubuntu – but it is Cygwin specific code that is failing.

        Show
        Russel Winder added a comment - Daniel, This issue is solely about the MSYS problem, which I think is now fixed – at least the most obvious aspect of the problem is. The Cygwin problem I am reporting is GROOVY-3209 . Basically the Cygwin execution of the Posix script fails on Windows XP running in VirtualBox on Ubuntu – but it is Cygwin specific code that is failing.

          People

          • Assignee:
            Russel Winder
            Reporter:
            Russel Winder
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: