RFR: 8067951: System.loadLibrary cannot find library when path contains quoted entry
Ivan Gerasimov
ivan.gerasimov at oracle.com
Tue Dec 23 13:31:34 UTC 2014
Hello!
Content of the environment variable PATH is appended to java.library.path.
When ClassLoader.loadLibrary() is called, these paths are used to search
for the library file.
However, if the entry were quoted, the file locating fails.
According to this blog entry [1], quoted entries are allowed in PATH
under Windows, so we should deal with them somehow.
On the other hand, a valid path on Unix can contain quotes, so the
proposed patch can change the behavior for those rare environments that
have entries in PATH starting and ending with a quote.
However, we already have ambiguity in processing the paths, as they can
contain colon or semicolon...
Here's the proposed fix. It doesn't try to resolve all the ambiguities,
but only adds handling entirely quoted entries.
BUGURL: https://bugs.openjdk.java.net/browse/JDK-8067951
WEBREV: http://cr.openjdk.java.net/~igerasim/8067951/0/webrev/
Would you please help review this fix?
[1] http://blogs.msdn.com/b/oldnewthing/archive/2006/09/29/776926.aspx
Sincerely yours,
Ivan
More information about the core-libs-dev
mailing list