Griffon
  1. Griffon
  2. GRIFFON-530

run-app on projects with composed name

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1
    1. output.txt
      16 kB
      Fabrizio Cucci

      Issue Links

        Activity

        Hide
        Andres Almiray added a comment -

        I did some more digging, it appears the problem lies in $GRIFFON_HOME/scripts/RunApp.groovy (line 140)

        https://github.com/griffon/griffon/blob/master/subprojects/griffon-scripts/src/main/groovy/RunApp.groovy

        For some unknown reason Windows fails to execute the process if jardir points to a directory whose path contains spaces (such as "C:\Program Files"). There's no problem if either java.library.path or -classpath contains spaces. My recommendation would be to create applications in a directory whose path does not contain spaces, that is until we finally resolve this matter.

        Show
        Andres Almiray added a comment - I did some more digging, it appears the problem lies in $GRIFFON_HOME/scripts/RunApp.groovy (line 140) https://github.com/griffon/griffon/blob/master/subprojects/griffon-scripts/src/main/groovy/RunApp.groovy For some unknown reason Windows fails to execute the process if jardir points to a directory whose path contains spaces (such as "C:\Program Files"). There's no problem if either java.library.path or -classpath contains spaces. My recommendation would be to create applications in a directory whose path does not contain spaces, that is until we finally resolve this matter.
        Hide
        Fabrizio Cucci added a comment -

        It's quite strange because currently I'm creating all my applications in:

        C:\griffon\

        So, considering the previous creation, I have C:\griffon\groovyEditor without any spaces...

        Show
        Fabrizio Cucci added a comment - It's quite strange because currently I'm creating all my applications in: C:\griffon\ So, considering the previous creation, I have C:\griffon\groovyEditor without any spaces...
        Hide
        Mathieu Fichefet added a comment - - edited

        Hi Andres and Fabrizio,

        I had the same problem. Right after creating a griffon application and running it, I noticed that the JVM was trying to find a class that omitted the first part of my camel-cased class name.

        I found that the following changes fixed my problem (Griffon 1.0.1) :

        1. Quote-change as described in _GriffonBootstrap.groovy :

         javaOpts << "-Djava.library.path=\"$libraryPath\"".toString() 

        2. Pass the runtime command as a single String in RunApp.groovy :

         Process p = Runtime.runtime.exec("${cmd.join(' ')}", null, jardir) 
        Show
        Mathieu Fichefet added a comment - - edited Hi Andres and Fabrizio, I had the same problem. Right after creating a griffon application and running it, I noticed that the JVM was trying to find a class that omitted the first part of my camel-cased class name. I found that the following changes fixed my problem (Griffon 1.0.1) : 1. Quote-change as described in _GriffonBootstrap.groovy : javaOpts << "-Djava.library.path=\"$libraryPath\"".toString() 2. Pass the runtime command as a single String in RunApp.groovy : Process p = Runtime.runtime.exec("${cmd.join(' ')}", null, jardir)
        Hide
        Andres Almiray added a comment -

        Thanks Mathieu, I'll apply your suggestions

        Show
        Andres Almiray added a comment - Thanks Mathieu, I'll apply your suggestions
        Show
        Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon/commit/c71348822f8f6f3734a711a8fc0d15f82d739765

          People

          • Assignee:
            Andres Almiray
            Reporter:
            Fabrizio Cucci
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: