Create a URI for the jar specified by the path string.
The steps used here correctly encode "illegal" characters - such as embedded blanks - in
the path string that otherwise would render the URI unusable. The URI constructor that
accepts just the path string does not perform this encoding.
File archiveFile = new File(path);
URI archiveURI = archiveFile.toURI();
String scheme = (archiveFile.isDirectory() ? "file" : "jar");
URI answer = new URI(scheme, null /* authority */, archiveURI.getPath(), null /* query */, null /* fragment */);
return answer;