8207690: Parsing API for classpath and similar path strings

Weijun Wang weijun.wang at oracle.com
Tue Sep 11 15:09:58 UTC 2018


Clarified.

So classpath can call this new method first and then expand * to all JAR files. This is fine.

Thanks
Max

> On Sep 11, 2018, at 11:05 PM, Roger Riggs <roger.riggs at oracle.com> wrote:
> 
> Hi Max,
> 
> Right, that is a description of the shell environment on Windows and how the java launcher behaves.
> On Windows the launcher expands wildcards when evaluating classpath from the environment
> and the command line args.  After they are expanded the java.class.path property is set.
> The proposed API can be used with other paths and does not expand wildcards.
> 
> Regards, Roger
> 
> On 9/11/18 10:53 AM, Weijun Wang wrote:
>> https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html#A1100762
>> 
>> This is not about the wildcard parsed by the shell. The bug synopsis mentions "classpath" and I am just curious if it covers this feature. I don't have my own user case for it.
>> 
>> --Max
>> 
>>> On Sep 11, 2018, at 10:48 PM, Roger Riggs <roger.riggs at oracle.com> wrote:
>>> 
>>> Hi,
>>> 
>>> What would the use case be for that?
>>> 
>>> A search path is usually just a sequence of file paths;  wildcard expansion is not includes.
>>> Wildcards are significant only in shell contexts, though the expansion is done by the shell on Unix and by the application on Windows;  it would add a fair bit of complexity.
>>> 
>>> Roger
>>> 
>>> 
>>> On 9/11/18 10:44 AM, Weijun Wang wrote:
>>>> Is the wildcard character allowed in the input?
>>>> 
>>>> I'm thinking of the wildcard support in classpath.
>>>> 
>>>> --Max
>>>> 
>>>>> On Sep 11, 2018, at 2:16 AM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>>>>> 
>>>>> Please review the API and implementation of an API to parse Path strings.
>>>>> Two methods are added to java.nio.file.Paths to parse a string using the path separator delimiter
>>>>> and return either List<String> or List<Path>.  Empty path elements are ignored.
>>>>> 
>>>>> For compatibility with current URLClassPath behavior the internal implementation handles
>>>>> replacement of empty paths.
>>>>> 
>>>>> Webrev:
>>>>> http://cr.openjdk.java.net/~rriggs/webrev-8207690_parsing_api_for_classpath_and_similar_path_strings/
>>>>> 
>>>>> CSR:
>>>>>   https://bugs.openjdk.java.net/browse/JDK-8208208
>>>>> 
>>>>> Thanks, Roger
>>>>> 
> 



More information about the core-libs-dev mailing list