On Thu, Mar 27, 2025 at 3:03 PM Jaikiran Pai <jai.forums2...@gmail.com>
wrote:

> Hello Eirik,
>
> The code in URLJarFile which does that check for "~" seems to have been
> introduced for https://bugs.openjdk.org/browse/JDK-4447921. It doesn't
> tell why the "~" was necessary.
>

Similar to the Unix history of using "~" as a substitution for home
directories [1], perhaps the "Home" button on the Lear-Siegler ADM-3A
terminal also inspired use of "~" to signify the "Home" host, a.k.a
'localhost' on some platform historically supported by the JDK?

Currently, the JDK resolves both these URLs on unixes:

file://localhost/etc/hosts
file://~/etc/hosts

while the latter is rejected by curl (MacOS) as a "Bad file:// URL".

Any AIX or Solaris/SunOS historians here?

Eirik.

[1] https://en.wikipedia.org/wiki/Tilde#Directories_and_URLs

Reply via email to