Bug #4026
closedBootstrapper will not run kepler in a directory with spaces
0%
Description
When the bootstrapper is run, it generates the classpath based on where the kepler directory is. If this location includes spaces in the path, it fails with the error:
Exception in thread "main" Java returned: 1
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:89)
at org.kepler.build.runner.Kepler.main(Kepler.java:65)
Caused by: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:188)
at org.kepler.build.Run.run(Run.java:143)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:85)
... 1 more
--- Nested Exception ---
Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:188)
at org.kepler.build.Run.run(Run.java:143)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:85)
at org.kepler.build.runner.Kepler.main(Kepler.java:65)
I've tried adding quotes to the paths in multiple forms. The first form, I put the quotes around just the parts of the path with spaces (i.e. c:\"Program Files"\Kepler-1.0Dev). The second way I tried it was with quotes around the entire classpath (i.e. "c:\Program files\Kepler-1.0Dev"). Neither option seems to work. Need to figure this out since this is the year 2009 and paths with spaces should not matter.
Related issues
Updated by Chad Berkley over 15 years ago
This was actually a problem with the lib path, not the classpath. The classpath is handled internally by the Java ant object when you use the setClasspath() method. Spaces are handled no problem. The problem was that we were setting a textual argument "-Djava.lib.dir=...". If that argument contained spaces, the JavaCommandline object that the Java object creates would fail because it thought the class name had started after the first space. The solution was simply to put quotes around the java.lib.dir value.