title: How to accept both an absolute or relative path as a URL? (Java)
body: <p>What I'm trying to do is creating a URL object with a valid path to a file (in my case it's a unix system but I'm not sure whether it will be used on any other OS). The path should be given as a String. I can't figure out how to get my code accept both absolute or relative paths. Can anyone help?</p>