Somehow Optifine is not working?

Vi
3

I downloaded Optifine 1.15.2 and instead of a java file, it is displayed with the Minecraft logo. When I open optifine I'm also redirected to minecraft. How can I get it to be opened as a Java file?

Ca

Right click, open with and then select Java

Vi

Then it says something like: This file could not be opened mkt java.

Ca

Then you have installed Java incorrectly or incorrectly