RFR: 8067951: System.loadLibrary cannot find library when path contains quoted entry

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon Jan 5 17:41:21 UTC 2015

On 05.01.2015 18:48, Alan Bateman wrote:
> On 04/01/2015 20:23, Ivan Gerasimov wrote:
>> Ah, I see.
>> Though, not needing to check for quotes allows a bit more efficient 
>> implementation, so splitting the code for different platforms may 
>> also make sense.
>> I did it with another helper class in this webrev:
>> http://cr.openjdk.java.net/~igerasim/8067951/3/webrev/
> I think we should avoid introducing yet-another new class if possible 
> as we already load too many classes loading at startup. I see your 
> point about using the most efficient implementation but I think you 
> will get that with "if (ClassLoaderHelper allowsQuotedPathElements()) 
> { .. } else { .. }".

Here's another update:

The optimized loop is used both on Unix and on Windows, if there were no 
quotes found in PATH.
Not a big deal, of course, but it should save a few nano-seconds during 

Sincerely yours,

More information about the core-libs-dev mailing list