User:Sam/Portage help/Java unmasking

Background
Java in Gentoo supports two modes once installed:
 * 1)   in  (you need the   USE flag enabled for this). This is what ebuilds use during installs.
 * 2)   in  which allows you to, as your user, run  and use the version you desire.

This article is for unmasking system-vm for use in ebuilds. This flag is currently masked for newer Javas like 11 and 17 because packages may break with it. No action is required for the user mode described above.

Enabling Java 11
Links:
 * covers progress towards unmasking Java 11, focusing on issues likely to hit users / dependencies of packages.
 * covers all known bugs related to Java 11 but may be less important.

Installation
Install any application which needs OpenJDK 11. If it doesn't pull it in, you'll need to emerge it manually as below:

Activating
You may need to activate OpenJDK 11 after installing it.

Check if it's enabled (we want  next to openjdk*11)

Enable it if it's not already (in this case, it's number '2', it might be different for you):

Enabling Java 17
Links:
 * - covers all known bugs related to Java 17.
 * - covers all test failures specific to Java 17.

Installation
Install any application which needs OpenJDK 17. If it doesn't pull it in, you'll need to emerge it manually as below:

Activating
You may need to activate OpenJDK 17 after installing it.

Check if it's enabled (we want  next to openjdk*17)

Enable it if it's not already (in this case, it's number '2', it might be different for you):