Bug 239816 - java/openjdk11 JRE only option
Summary: java/openjdk11 JRE only option
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-java mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-13 13:24 UTC by ari
Modified: 2019-10-30 07:48 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ari 2019-08-13 13:24:21 UTC
The older JDK ports had alternatives for just the JRE. And since 90% of the time most people need only the JRE that's a much smaller package that builds more quickly.

Could we have this either as an option in the Makefile or a separate port?
Comment 1 Michael Osipov 2019-08-13 14:03:58 UTC
Note that Oracle has dropped JRE only builds. Maybe Greg can shed some light whether this is worth the effort.
Comment 2 Greg Lewis freebsd_committer 2019-08-25 20:51:34 UTC
As Michael notes, the JRE is no longer being distributed by Oracle for either JDK 11 or 12.  Same with AdoptOpenJDK.

This stack overflow posting is relevant:

https://stackoverflow.com/questions/52714672/is-there-an-openjdk-11-jre

Particularly since the author is a Java product manager at Oracle.  Basically it sounds like there is no such thing as an official JRE any more.  Instead you can use jlink to create a custom distribution containing only the modules that are needed for your application.  However, that's not something you'd want in the ports system necessarily.

So yes, you could do a separate port which limited itself to the set of tools that were previously in the JRE, but I'd question the benefits of FreeBSD branching out to do something like this.

Absent patches to do just that, I'm going to close this, but please feel free to create such a port and post some patches for comment.
Comment 3 ari 2019-08-26 00:07:46 UTC
The Oracle JDK11 release notes specific mention that there is no longer a JRE build. And java.com still points users to the Java8 JRE. Which is all a bit odd, but I've long since stopped trying to understand what Oracle's plan is.

Although they are a bit hidden on their website, adoptopenJDK are distributing JRE builds:

https://adoptopenjdk.net/archive.html?variant=openjdk11&jvmVariant=hotspot

Does that make it any easier to offer a FreeBSD port? I understand it might just be a nuisance to maintain, but with battleblow now merged back to adoptopenJDK is all this a bit simpler?
Comment 4 Michael Osipov 2019-08-26 06:55:43 UTC
(In reply to ari from comment #3)

Where do you see that battleblow has merged back to AdoptOpenJDK?
Comment 5 ari 2019-08-26 07:55:35 UTC
Oh, my bad. I was looking at https://github.com/battleblow/openjdk-jdk11u/ and seeing that the master branch was even with the forked repo. But now I see that the work is all in separate branches, so I was wrong.

Hopefully one day all these patches will travel upstream.
Comment 6 Greg Lewis freebsd_committer 2019-08-26 14:13:11 UTC
Interesting.  So you have to jump through a few hoops, but you can get a JRE from AdoptOpenJDK if you try.

You might and see what you get if you use the legacy-jre-image target when building openjdk11 rather than the images target that the current build uses and create an openjdk11-jre port based on that.  Similar to the openjdk8-jre port.
Comment 7 Lev A. Serebryakov freebsd_committer 2019-08-26 14:37:56 UTC
New JDKs have jlink/jdeps utilities. Java ports infrastructure could add ways to use them to build custom JREs, like this:

https://reviews.freebsd.org/D20429
Comment 8 edwinmith 2019-10-30 07:48:21 UTC
Nice to see this post here and I like it. To get more about online surveys you can check this. https://tellthebell.ninja