Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

cljsc.bat emit FileNotFoundException when it compile samples of the ClojureScript project in windows like below.


Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/closure__init.class

or cljs/closure.clj on classpath:

It is caused by lack of a backslash in the end of path of the system environment variable, %CLOJURESCRIPT_HOME% set by a user.
In the case CLASSPATH is set to "C:<BR/>clojure\clojurescriptsrc\clj;C:<BR/>clojure\clojurescriptsrc\cljs" and this make it impossible for javac to find cljs/clojure.clj file.

So it can be solved by adding a backslash to the path of %CLOJURESCRIPT_HOME%.

I attached the patched file, "cljsc-path.bat"

7 Answers

0 votes
by

Comment made by: dnolen

Can we please get a proper git diff thanks (and please send in your CA)! Also would be nice to get Windows users to check this out.

0 votes
by

Comment made by: guruma

git diff

0 votes
by

Comment made by: dnolen

Thank you! Have you sent in your CA? http://clojure.org/contributing

0 votes
by

Comment made by: guruma

Yes i have sent my CA.

0 votes
by

Comment made by: dnolen

Excellent, the patch is not correctly formatted. Can we get a new patch that conforms to http://github.com/clojure/clojurescript/wiki/Patches

0 votes
by

Comment made by: jeremyrsellars

A properly formatted patch.

When necessary, adds missing path separator at the end of the CLOJURESCRIPT_HOME
environment variable.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-575 (reported by guruma)
...