Whirr
  1. Whirr
  2. WHIRR-271

Classpath needs to be quoted in whirr script

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: 0.5.0
    • Component/s: cli
    • Labels:
      None
    • Environment:

      MacOS

      Description

      I tried to start whirr after I had my machine split into two drives and the new location has a "Macintosh HD" in the name, i.e. containing a whitespace. This broke the start like so

      larsgeorge@de1-app-mbp-2:~/Downloads/whirr-0.4.0-incubating$ bin/whirr 
      bin/whirr: line 21: [: /Volumes/Macintosh: binary operator expected
      Exception in thread "main" java.lang.NoClassDefFoundError: HD/Users/larsgeorge/Downloads/whirr-0/4/0-incubating/bin///:/Volumes/Macintosh
      Caused by: java.lang.ClassNotFoundException: HD.Users.larsgeorge.Downloads.whirr-0.4.0-incubating.bin...:.Volumes.Macintosh
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      

      I checked what the other projects do and they simply quote the classpath in the scripts. So we should have this:

      java -cp "$classpath" org.apache.whirr.cli.Main "$@"
      
      1. WHIRR-271.patch
        0.5 kB
        Andrei Savu

        Activity

          People

          • Assignee:
            Andrei Savu
            Reporter:
            Lars George
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development