Clojure
Clojure copied to clipboard
java.net.MalformedURLException: unknown protocol: c
Using LightTable boot project core.clj
connected to remote nREPL,
(defn example
"Just a simple example"
[x] (identity x))
example ;; Hit <Ctrl-D> for docstring
kills the editor, needs a reboot of lein-light-nrepl REPL as any attempt to further evaluate expressions will get null
exceptions after this.
java.net.MalformedURLException: unknown protocol: c
at java.net.URL.<init>(URL.java:600)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
...
I presume due to the fact that a URL / patch such as C:\\some\path\
or C:/some/path
does, under current conditions, not get a file:/
replacement of the (Unix) absolute root forward slash - which is required for a proper functioning of (URL. "file:/C:\\some\\path")
and (URL. "file:/C:/some/path")
both work.
Although I use Git Bash for Windows (which uses mingw /c/some/path
), the JDK / environment almost all the time seems to use the regular windows path with the usual drive letter. So seems like below isn't entirely suited for Windows (or failure in general I guess).
https://github.com/LightTable/Clojure/blob/65acb2f3cbdd7c337333522b114f10ce5ab445cf/lein-light-nrepl/src/lighttable/nrepl/doc.clj#L108