It could be the case that your anti-virus software has identified Optifine as a threat. You won't be able to use the mod if this is the case. Just check your anti-virus to confirm whether or not this is the case. You'll have to provide Optifine with access if anti-virus has blocked it from your device.
Once you've downloaded Optifine, it's time to open up the Optifine Installer. This is actually pretty simple as well. All you'll need to do is right-click on the downloaded file, select 'open with', and then click 'Java(TM) Platform SE binary'. Once you do this, a little program will open up.
Once it is installed, select Optifine from the drop-down menu and run it. After launching the game, you will need to go to “Options” and then go to “Video Settings” to apply the best possible Optifine Settings for FPS. When you do this, a new page will appear on the screen as shown in the picture below.
Java is not enabled or there are multiple places where Java could be disabled. Check the Java Control Panel and your browser plugins/addons list. Make sure new generation plugin is enabled: Unless you need to run in the legacy mode, make sure New generation plugin is enabled in the Java Control Panel.
Download and install Java if you don't have it installed, if you do open up your downloads folder (or wherever you downloaded the Optifine jar to) and right click on Optifine and click Properties, then set it to open with Java.
The issue that File Explorer keeps opening on its own is usually caused by the misbehavior of software on its own. So, in order to fix this problem, you can try restarting File Explorer. Usually, when there is a problem with the program or the application, restarting it is able to fix the problem …
The first thing you need to do in order to fix Java files is download the Jarfix. ... You may have to confirm that the file is safe, and as long as it is called 'jarfix.exe', it is 100% safe to download. Once you've downloaded Jarfix, it's time to run the Jarfix!
Open your "minecraft.jar" folder (See above) with an archiving utility such as WinRAR or 7-Zip, and drag the mod files from the folder you downloaded, to the minecraft. jar folder. Most mods require the folder "META-INF" inside of minecraft.
For the most part, OptiFine will work with almost any version of Forge on the same version of Minecraft, but some WILL be incompatible. For best results, you should use the recommended version of Forge that is listed in the OptiFine changelog.