Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-12-09 Thread Brent Christian
FYI, a fix for this (8235361[1]) is in review: https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-December/063934.html -Brent 1. https://bugs.openjdk.java.net/browse/JDK-8235361

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-22 Thread Brent Christian
Hi, Jaikiran On 11/18/2019 7:56 AM, Jaikiran Pai wrote: The actual code which does this construction, resides here[2] . I see at [3] that '/' is prepended to the path. As Alan suggested [4], prepending with "file:/" ought to get it working. -Brent 2.

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread Alan Bateman
On 20/11/2019 17:02, David Lloyd wrote: I'll see where the usages are. I believe at least one usage is out of our control though, and I'm pretty sure that Maven uses absolute paths for surefire and failsafe (test) launching. Let us know on that. I remember we ran into issues with Sunfire

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread David Lloyd
On Wed, Nov 20, 2019 at 8:59 AM Alan Bateman wrote: > > On 20/11/2019 13:50, David Lloyd wrote: > > : > > OK, but this decision violates both the old and updated spec (and > > makes it difficult to write code that works in both cases: in > > situations that reject absolute URLs (javac) and in

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread David Lloyd
On Wed, Nov 20, 2019 at 9:26 AM Scott Palmer wrote: > > /C:/blah... is “root relative”. The (old) spec says the URL must be "relative > to the code base". What does "code base" mean when not referring to Applets > or RMI? "code base" is generally the URL of the class path entry itself. It's

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread Scott Palmer
/C:/blah... is “root relative”. The (old) spec says the URL must be "relative to the code base". What does "code base" mean when not referring to Applets or RMI? This seems like a bad idea (security hole) that worked by accident. Scott On Wed, Nov 20, 2019 at 10:00 AM Alan Bateman wrote: >

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread Alan Bateman
On 20/11/2019 13:50, David Lloyd wrote: : OK, but this decision violates both the old and updated spec (and makes it difficult to write code that works in both cases: in situations that reject absolute URLs (javac) and in situations that reject drive letters (this code)), so I would request that

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread David Lloyd
On Wed, Nov 20, 2019 at 2:25 AM Alan Bateman wrote: > > On 19/11/2019 23:25, David Lloyd wrote: > > : > > OK, having read the updated specification (thanks Alan!) I'm now quite > > curious why `/C:/helloworld.jar` is considered invalid. It is in fact > > a valid relative URL (colons are allowed

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread Alan Bateman
On 19/11/2019 23:25, David Lloyd wrote: : OK, having read the updated specification (thanks Alan!) I'm now quite curious why `/C:/helloworld.jar` is considered invalid. It is in fact a valid relative URL (colons are allowed in path segments, and the leading `/` unambiguously delineates the URL

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread Brent Christian
On 11/18/19 7:36 AM, Alan Bateman wrote: > Yes, bad values are now ignored, bringing an end to an effort on the run-time over multiple releases to fix the problems this area. JDK-8224253[1] is the JDK 13 release note to announce this change and I see you've found the system property that you

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread David Lloyd
On Mon, Nov 18, 2019 at 9:37 AM Alan Bateman wrote: > > On 18/11/2019 15:01, Jaikiran Pai wrote: > > : > > > > So this Class-Path entry is being ignored starting Java 13. > > > Yes, bad values are now ignored, bringing an end to an effort on the > run-time over multiple releases to fix the

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread Alan Bateman
On 19/11/2019 20:22, David Lloyd wrote: : Where can the updated specification be found? It has in the past been clearly specified and well understood that class path entries are interpreted as relative URLs. If that has changed then this will definitely break Quarkus and perhaps other

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread Lance Andersen
> On Nov 19, 2019, at 3:22 PM, David Lloyd wrote: > > On Mon, Nov 18, 2019 at 9:37 AM Alan Bateman wrote: >> >> On 18/11/2019 15:01, Jaikiran Pai wrote: >>> : >>> >>> So this Class-Path entry is being ignored starting Java 13. >>> >> Yes, bad values are now ignored, bringing an end to an

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread David Lloyd
On Mon, Nov 18, 2019 at 9:37 AM Alan Bateman wrote: > > On 18/11/2019 15:01, Jaikiran Pai wrote: > > : > > > > So this Class-Path entry is being ignored starting Java 13. > > > Yes, bad values are now ignored, bringing an end to an effort on the > run-time over multiple releases to fix the

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-19 Thread Dalibor Topic
On 18.11.2019 16:56, Jaikiran Pai wrote: Quarkus is a relatively new project and furthermore this specific code is very new too (a few months old I think). So I think this never got covered as part of the outreach efforts. Yeah, Quarkus is not on the OpenJDK Quality Outreach list yet. I've

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-18 Thread Jaikiran Pai
Hello Alan, On 18/11/19 9:17 PM, Alan Bateman wrote: > On 18/11/2019 15:03, Jaikiran Pai wrote: >> FWIW - this was reported by one of Quarkus project users here >> https://github.com/quarkusio/quarkus/issues/5359 >> > BTW: Do you know if this is a mistake in this project or something in > a

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-18 Thread Alan Bateman
On 18/11/2019 15:03, Jaikiran Pai wrote: FWIW - this was reported by one of Quarkus project users here https://github.com/quarkusio/quarkus/issues/5359 BTW: Do you know if this is a mistake in this project or something in a plugin used in its build? There was an outreach effort to tack to down

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-18 Thread Alan Bateman
On 18/11/2019 15:01, Jaikiran Pai wrote: : So this Class-Path entry is being ignored starting Java 13. Yes, bad values are now ignored, bringing an end to an effort on the run-time over multiple releases to fix the problems this area. JDK-8224253[1] is the JDK 13 release note to announce

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-18 Thread Jaikiran Pai
FWIW - this was reported by one of Quarkus project users here https://github.com/quarkusio/quarkus/issues/5359 -Jaikiran On 18/11/19 8:31 PM, Jaikiran Pai wrote: > Imagine 2 jar files. One called helloworld.jar which contains just a > single org.myapp.HelloWorld class which prints to System.out

Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-18 Thread Jaikiran Pai
Imagine 2 jar files. One called helloworld.jar which contains just a single org.myapp.HelloWorld class which prints to System.out from its main method. The other jar called manifest-cp-test.jar. This manifest-cp-test.jar contains (only a) META-INF/MANIFEST.MF with the following content: