Login  Register

Re: Return of the "java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt" exception...

Posted by Sven Gothel on Jun 03, 2015; 8:53am
URL: https://forum.jogamp.org/Return-of-the-java-lang-UnsatisfiedLinkError-Can-t-load-library-System-Library-Frameworks-gluegen-rt-tp4034549p4034595.html

On 06/03/2015 03:24 AM, Wade Walker [via jogamp] wrote:

>     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.
Maybe we can use our com.jogamp.common.net.Uri impl. instead of URI,
since Uri implements RFC 2396 _and_ RFC 3986 (multibyte unicode character
encoding).

~Sven



signature.asc (828 bytes) Download Attachment