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?
Note that Oracle has dropped JRE only builds. Maybe Greg can shed some light whether this is worth the effort.
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:
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.
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:
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?
(In reply to ari from comment #3)
Where do you see that battleblow has merged back to AdoptOpenJDK?
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.
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.
New JDKs have jlink/jdeps utilities. Java ports infrastructure could add ways to use them to build custom JREs, like this:
MARKED AS SPAM