Cygwin trouble when classpath has spaces in it

#9 · closed · 6 comments

View on GitHub ↗

markgitset

When I first tried to run the clj script, I got: java.lang.NoClassDefFoundError: and Caused by: java.lang.ClassNotFoundException: and because my $CP variable was being set to: C:\Documents and Settings\Mark\lib\ClojureX;C:\Documents and Settings\Mark\lib\ClojureX\lib\clojure.jar;C:\Documents and Settings\Mark\lib\ClojureX\lib\clojure-contrib.jar;C:\Documents and Settings\Mark\lib\ClojureX\lib\jline.jar I was able to fix the problem by changing one character. On line 231, I changed if $cygwin; then CP=`cygpath -wp "$CP"` fi to if $cygwin; then CP=`cygpath -dp "$CP"` fi so that my $CP is now set to use DOS paths: C:\DOCUME~1\Mark\lib\ClojureX;C:\DOCUME~1\Mark\lib\ClojureX\lib\clojure.jar;C:\DOCUME~1\Mark\lib\ClojureX\lib\CLOJUR~1.JAR;C:\DOCUME~1\Mark\lib\ClojureX\lib\jline.jar This worked like a charm for me (on Windows 7 with cygwin). Thanks!

Comments

citizen428

I'm quite bad at anything related to Windows, but I thought newer Windows systems deal more gracefully with path names. I'd appreciate some more feedback by other Cygwin users, but I'm afraid there aren't that many.

markgitset

I actually had more trouble after posting this. Is there somewhere I can e-mail or post my updated script as it is now?

citizen428

Fork, patch, send pull request. :-)

markgitset

Was afraid you might say something like that. I'm completely new to git, but maybe this will be a good excuse to make me learn it a little.

citizen428

It's really easy. Press the fork button on the project page, check out your tree. Then make your changes, commit and send me a pull request (done from your fork of the repo). :-)

citizen428

Believe it or not, I finally included the changes you made in your branch.