Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

java.net.MalformedURLException: unknown protocol: c #97

Open
robjens opened this issue Apr 5, 2018 · 0 comments
Open

java.net.MalformedURLException: unknown protocol: c #97

robjens opened this issue Apr 5, 2018 · 0 comments

Comments

@robjens
Copy link

robjens commented Apr 5, 2018

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).

(string/replace-first file #"^/" "file:/"))))]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant