[PATCH] 8218268: Javac treats Manifest Class-Path entries as Paths instead of URLs

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Feb 28 15:39:19 UTC 2019


On 2/28/19 5:05 AM, Alan Bateman wrote:
> On 28/02/2019 12:13, Donald Kwakkel wrote:
>> Hi All,
>>
>> This is my first contribution to openjdk, so hope to learn a lot!
>>
>> I created a fix + tests for 
>> https://bugs.openjdk.java.net/browse/JDK-8218268.
>> Now the manifest classpath is behaving the same in javac and java for
>> file paths.
>>
>> This fixes:
>> 1. The Java Compiler treats the entries as URLs, according to spec:
>> https://docs.oracle.com/en/java/javase/11/docs/specs/jar/jar.html#class-path-attribute 
>>
>> 2. The behavior of the JVM ClassLoader and the Java Compiler is equal
>> (for file urls)
>>
> The compiler-dev mailing list is the best place to discuss changes to 
> javac. However in this case you are going into a topic with a lot of 
> sad history and where there is ongoing work to get the JAR file 
> specification and the runtime support aligned [1][2]. So I think 
> include the core-libs-dev list in the discussion to understand the 
> changes there and how javac might be updated to align with that.
>
> -Alan
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8217215
> [2] https://bugs.openjdk.java.net/browse/JDK-8216401

In addition to Alan's comments, I note that although you provided a test 
(which is good), you wrote it as a shell test (which is not so good.) 
Depending on how this work may proceed, it would be better to replace 
the test with a Java test, perhaps using the test/langtools toolbox 
classes, which were specifically written for this sort of use. However, 
I strongly recommend that we sort out the spec issues first, before 
working on any changes to the test.

-- Jon




More information about the jdk-dev mailing list