res.getURI().resolve() doesnt work for jar urls. So I had to use the resolve() method of IResource to get a new instance of IResource and then use getURI(). In the resolve method, I have added specific handling for jar resources.