This is a system property, so you can set it via -Djdk.tls.ephemeralDHKeySize=2048 as a JVM argument or through System.setProperty in the code. (I have not tested this property, but some properties are read only once by the library that uses them, and then are cached constantly during the JVM run, so you would usually want to set this parameter early enough if you set it to code.)
Valid values ββare documented in the JSSE Reference Guide : "Setting the Size of the Diffie-Hellman Ephemeral Keys . "
Bruno source share