[External] : Re: Draft JEP, "JDK packaging guidelines"

Michael Hall mik3hall at gmail.com
Thu Mar 3 09:26:32 UTC 2022



> On Mar 2, 2022, at 2:31 PM, Alexey Semenyuk <alexey.semenyuk at oracle.com> wrote:
> 
> Michael,
> 
> The JEP doesn't have a goal to define protocol of picking JDK from many installed. It provides recommendations to avoid conflicts between them. It covers installation directory names, package names, and other elements of packages that can be in conflict.
> 
> - Alexey
> 

Alexey,

Standardizing the naming conventions is probably not a bad thing. Although simply including the vendor name seems like it would be sufficient to avoid conflicts. For OS X Amazon Corretto (amazon-corretto-17.jdk),  and Azul Zulu (zulu-17.jdk), both appear to do this. Graal also includes a id (graalvm-ce-java11-21.1.0).

For usage with the java command or jpackage the developer will still have to be aware of and possibly manipulate the contents of the /Library/Java/JavaVirtualMachines directory if they have a concern with the vendor for the jdk being used. 

Brief demonstration. With the jdk 17’s as above. Initially my openjdk was still an early access so I got this…

/usr/libexec/java_home -v 17 --exec java -version
openjdk version "17.0.2" 2022-01-18 LTS
OpenJDK Runtime Environment Zulu17.32+13-CA (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.32+13-CA (build 17.0.2+8-LTS, mixed mode, sharing)

I installed the latest openjdk 17 and then got…
/usr/libexec/java_home -v 17 --exec java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

The versions appear to be about the same but somehow this is now seen as more current.

There is nothing wrong that I see with the proposed naming convention. If you want to parse vendor or version information from the name this would be useful. But developers would still need to be aware as you indicate that the scope of the change doesn’t do anything to resolve what jdk they are using on OS/X. This still strictly depends on what is determined to be the most recent version, whatever vendor.



More information about the jdk-dev mailing list