Update Java in the Java Control Panel
Read moreHow do I change java version on Mac?
Use the Traditional Way to Change Java Version in MacOS
Read moreHow do I change my version of Java?
In the Java Control Panel, click on the Java tab. Verify that the latest Java Runtime version is enabled by checking the Enabled box. Click OK in Java Control Panel window to confirm changes and close the window. Try to run same applet and verify it is now running using latest version of Java installed in your system.
Read more