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

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

@robjens

Description

@robjens

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:/"))))]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions