问题
I'm getting an error:
WARNING: Illegal character in path at index 25: file:/C:/Users/bkuhl/Java_Projects/CMT/build/web/WEB-INF/lib/antlr-2.7.6.jar
I'm having trouble determining what the cause here might be. The stack trace is
java.net.URISyntaxException: Illegal character in path at index 25: file:/C:/Users/bkuhl/Java_Projects/CMT/build/web/WEB-INF/lib/antlr-2.7.6.jar
at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.checkChars(URI.java:3002)
at java.net.URI$Parser.parseHierarchical(URI.java:3086)
at java.net.URI$Parser.parse(URI.java:3034)
at java.net.URI.<init>(URI.java:595)
at java.net.URL.toURI(URL.java:936)
.......
I'm at a complete loss on where to look. This same code is working on my co-workers machine so I figure it must be a path problem. The trouble is, I can't figure out where to look...
回答1:
Let me guess, your co-worker has no directory "Java_Projects". The 25th character is the underscore "_". Either you change the path or you escape the character.
Usually a URLEncoder can help in this case.
回答2:
Try renaming the "Java_Projects" to MyProjects or something the name "Java" sometimes cause the issue
来源:https://stackoverflow.com/questions/9673344/illegal-character-in-path-at-index-25