I read a lot of posts saying that in java 8 it is possible to expand the DH key size to 2048. They say it is possible from the system property by changing the value of:
This is a system property, so you could set it via -Djdk.tls.ephemeralDHKeySize=2048
as a JVM argument or via System.setProperty
within the code. (I haven't checked for this property, but some properties are read only once by the library that uses them, and then cached permanently during the execution time of the JVM, so you'd generally want to set that setting early enough if you set it within the code.)
The acceptable values are documented in the JSSE reference guide: "Customizing Size of Ephemeral Diffie-Hellman Keys".