> Alexis Drogoul wrote
> Notice the difference ? His installation of Eclipse Luna is in a folder
> called "Eclipse Luna" (*with* a space), mine is in "eclipse" (*no* space).
>
> Ah, now I remember this. I ran into this at some point, but forgot about it :)
> Turns out, there's an error in Eclipse's FileLocator.resolve() where it
> doesn't escape spaces properly (the bug report is at
>
https://bugs.eclipse.org/bugs/show_bug.cgi?id=145096). Apparently a lot of
> Eclipse legacy code depends on this wrong behavior, so it doesn't sound like
> they're going to fix it.
>
> A fix we can do on our side is to change the resolver you create in your code
> to escape the spaces properly. Apparently if you change the resolved URL to a
> URI using the 3-argument constructor, then back to an URL, it'll escape it for
> you, like so:
>
> JarUtil.setResolver( new JarUtil.Resolver() {
> public URL resolve( URL url ) {
> try {
> URL urlUnresolved = FileLocator.resolve( url );
> URL urlResolved = new URI( urlUnresolved.getProtocol(),
> urlUnresolved.getPath(), null ).toURL();
> return( urlResolved );
> }
> catch( IOException ioexception ) {
> return( url );
> }
> catch( URISyntaxException urisyntaxexception ) {
> return( url );
> }
> }
> } );
>
> I haven't tested this fully, but I think this is how I did it. Not sure why
> this isn't in my current code base, I must have done it in a branch somewhere
> and forgotten it.