citizen428/ClojureX

clj script trouble on cygwin

Closed this issue · 3 comments

On my setup - cygwin 1.7 on Win7 the script fails due to quoting problems which cause DOS path backslashes to be treated as escapes and ignored. Changing from double quote to single quote around $CP (as shown) on the following lines (lines 252 and 255) fixes this issue:

eval java $JAVA_OPTS -cp '$CP' jline.ConsoleRunner clojure.main $INIT_OPTS $MAIN_OPTS
eval java $JAVA_OPTS -cp '$CP' clojure.main $INIT_OPTS $MAIN_OPTS

Thanks for this package..

I just pushed an updated version, can you make sure everything works for you now?

That did the trick - thanks! One other small nit. Some Java Standard Edition JDK installs do not support the --server flag. Easy workaround to edit the clj script to set "-client" but maybe "-server" should not be the default? I think the only advantage to that flag is a performance gain for longer running apps - at the expense of startup time.

Thanks for the feedback, glad things are working for you now.

Re "-client" vs. "-server": since a lot of people mainly use the clj script for getting a REPL, I think it makes sense to default to server. However, it's possible to pass all kinds of Java options to the clj script (see clj -h), so you can just set up an alias or something.