System.loadLibrary fails on Windows when path/java.library.path are of
a certain format, e.g. individually quoted.
On Windows PATH entries can be individually quoted (that's not necessary, but still possible).
http://blogs.msdn.com/b/oldnewthing/archive/2006/09/29/776926.aspx
Checking Windows command line shell confirms, it understands PATH correctly, whether its entries are quoted or not.
The quoting of individual Windows PATH entries should be handled when the PATH
environment variable is read. The Hotspot code in os_windows.cpp that reads PATH
and creates java.libary.path should remove the quotes. This will allow the removal
of the Windows specific quote handling and simplify splitting the java.library.path
and other similar paths.
There is no need to protect the Window path separator ";", as it has not been a problem.
The semi-colon does not appear to be used in Windows paths, though it is an allow character in file and directory names.
a certain format, e.g. individually quoted.
On Windows PATH entries can be individually quoted (that's not necessary, but still possible).
http://blogs.msdn.com/b/oldnewthing/archive/2006/09/29/776926.aspx
Checking Windows command line shell confirms, it understands PATH correctly, whether its entries are quoted or not.
The quoting of individual Windows PATH entries should be handled when the PATH
environment variable is read. The Hotspot code in os_windows.cpp that reads PATH
and creates java.libary.path should remove the quotes. This will allow the removal
of the Windows specific quote handling and simplify splitting the java.library.path
and other similar paths.
There is no need to protect the Window path separator ";", as it has not been a problem.
The semi-colon does not appear to be used in Windows paths, though it is an allow character in file and directory names.
- clones
-
JDK-8067951 System.loadLibrary cannot find library when path contains quoted entry
-
- Closed
-