java.nio.file.InvalidPathException

Illegal char <:> at index 2: /c:/a/b/c/d/hai.txt

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web171

  • via Coderanch by kri shan, 9 months ago
    Illegal char <:> at index 2: /c:/a/b/c/d/hai.txt
  • via javaworld.com by Unknown author, 1 year ago
    Illegal char <:> at index 2: a\:\b
  • via javaworld.com by Unknown author, 10 months ago
    Illegal char <:> at index 2: a\:\b
  • Stack trace

    • java.nio.file.InvalidPathException: Illegal char <:> at index 2: /c:/a/b/c/d/hai.txt at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 2 months ago
    Once, 3 months ago
    8 times, 3 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    7 more bugmates