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 "$@"