Hi Alan + Christoph, coming back to https://bugs.openjdk.java.net/browse/JDK-8218547 .
We wanted to check for the whole flow (in JLI_Open on Windows ) , e.g. checking whether only CreateFileW can be used instead of open. I think there is already a similar solution available in the codebase . See the os::open + create_unc_path functions in os_windows.cpp in the hotspot coding . There "simple" open is used for shorter paths ( < MAX_PATH) ; for larger paths an elp / unc path is constructed and _wopen is used on the elp/unc path : if (strlen(path) < MAX_PATH) { ret = ::open(pathbuf, oflag | O_BINARY | O_NOINHERIT, mode); } else { errno_t err = ERROR_SUCCESS; wchar_t* wpath = create_unc_path(pathbuf, err); .... ret = ::_wopen(wpath, oflag | O_BINARY | O_NOINHERIT, mode); I think we should do it the same way in JLI_Open . Is that fine with you? Unfortunately I think we cannot easily reuse the HS coding, so the have to take it over to jli . Best regards, Matthias > -----Original Message----- > From: Baesken, Matthias > Sent: Mittwoch, 6. Februar 2019 09:56 > To: Langer, Christoph <christoph.lan...@sap.com> > Cc: Chris Hegarty <chris.hega...@oracle.com>; core-libs- > d...@openjdk.java.net; Alan Bateman (alan.bate...@oracle.com) > <alan.bate...@oracle.com> > Subject: RE: RFR : 8217093: Support extended-length paths in > parse_manifest.c on windows > > Hi Christoph+Alan, I opened > > > https://bugs.openjdk.java.net/browse/JDK-8218547 > > JDK-8218547 : use CreateFile without open on Windows in jdk native code > > > To check for the usage of CreateFile (CreateFileW) without open . > > > Best regards, Matthias > > > > -----Original Message----- > > From: Langer, Christoph > > Sent: Dienstag, 29. Januar 2019 09:59 > > To: Baesken, Matthias <matthias.baes...@sap.com> > > Cc: Chris Hegarty <chris.hega...@oracle.com>; core-libs- > > d...@openjdk.java.net > > Subject: RE: RFR : 8217093: Support extended-length paths in > > parse_manifest.c on windows > > > > Hi Matthias, > > > > > > New webrev : > > > > > > > > > > > > http://cr.openjdk.java.net/~mbaesken/webrevs/8217093.4/ > > > > > > This is the one. Looks good ( and clean ). > > > > I agree, this version would be ok for me to be pushed. It would be good > > ,though, if there was a test for this (long paths on Windows). > > > > I also like Alan's suggestion to open a follow up bug to explore using > > CreateFile on Windows right away rather than trying open. Looking at > > libjava/libnet/libnio, it's all CreateFileW on Windows... > > > > Best regards > > Christoph > >