You can download the Java installation version offline. When installing Java using the Web Installer, it can cause some errors and the cause is usually an Internet connection. Next use Microsoft uninstaller to remove junk, registry entries. In this case, please remove all Java versions that are on the machine. If the Java Control Panel does not exist, it may conflict with JavaFX or another Java version. If the installation is successful, but Java does not work, check that the Java Control Panel appears in the Windows Control Panel.
The easiest way is to visit here to check the installed Java version. In this case, start the process of checking whether Java really works. There are some cases where you have successfully installed Java, but the error still occurs when running. Error Cannot Proceed with current Internet proxy settings Set up Internet Explorer security to the default level Java installation errors and how to fix them