It appears an IoException is thrown: java.io.IOException: Server returned HTTP response code: 403 for URL: https://domain.comThat proves that your SSL/TLS is working perfectly. That 403 came to you via SSL.
Does anyone know why this might be happening and what if anything is missing?What is missing is that you don't have permission to access that part of the site. Nothing to do with SSL/TLS or missing JAR files whatsoever. It is access control at the website.
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");Why are you doing these two steps? These haven't been necessary since JSSE was added to the JDK in 1.4.0 back in 2002.
What java tools should I be using to get more information on why this is not working?Use the JSSE debug output and you'll likely see that the connection is made and the HTTP traffic is flowing.
I can compile the code shown above but that 403 error and IoException are very troubling!