Hi Henry,
Thank you for posting your query in Microsoft Community.
This could be due to incompatibility/corruption in Java files. I would suggest you to completely uninstall older version of Java and install new.
Please refer to: Verify Java and Uninstall Out-of-Date Versions
If the issue still remains, you may place the computer in clean boot state to check any third party software conflict.
To help troubleshoot error messages and other issues, you can start Windows by using a minimal set of drivers and startup programs. This kind of startup is known as a "clean boot." A clean boot helps eliminate software conflicts.
Placing your system in Clean Boot state helps in identifying if any third party applications or startup items are causing the issue. You need to follow the steps from the article mentioned below to perform a Clean Boot.
**How to perform a clean boot in Windows**
Note: Refer "How to reset the computer to start normally after clean boot troubleshooting" to reset the computer to start as normal after troubleshooting.
Hope this information is helpful. Please feel free to reply in case you face any other issues with Windows in future.