SumanPramanik covers the 'how', but with respect to the compatibility that (with regards to any algorithm used not just sha256) depends on the client and server components in place, including the version of Java.
For SHA-256 you should be covered as this has been supported in Java for a long time (since version 1.4.2, which I'd estimate to be about 10 years old or so), and if you look at Clarity SaaS / On Demand servers in your web browser, you will see in the details/properties of those certificates that sha256 is being used there currently: https://ondemand.ca.com