My dad was playing minecraft and advised him to get optifine so i did that. When i went to try opening it nothing happened and showed no java logo like its just an unknown file extension. (the file was a .jar). then i checked java in the search bar and java didnt show up. i then downloaded java then after that it was installed and i was able to install optifine. im so confused
Minecraft use is own Java, but if you want to use a mod's installers like OptiFine or Forge, then you will need to downloaded and install Java manually.
Rollback Post to RevisionRollBack
Say something silly, Laugh 'til it hurts, Take a risk, Sing out loud, Rock the boat, Shake things up, Flirt with disaster, Buy something frivolous, Color outside the lines, Cause a scene, Order dessert, Make waves, Get carried away, Have a great day!
You can also make a batch file which includes the path to the runtime; for example (replace "amidst-v4-2.jar" with the name of the Optifine/Forge installer and paste into a text file and save it with the extension ".bat". Other (non-Windows) OSes have their own batch file formats):
"C:\Program Files\Minecraft\runtime\jre-x32\bin\javaw.exe" -Xmx1G -jar amidst-v4-2.jar
NOTE: The path will be different for a 64 bit OS ("Program Files (x86)" and "jre-x64") and if you have Minecraft installed to a different location (not the .minecraft folder, but where the launcher itself is installed to if you use the default install location). Also, the "pause" at the end keeps the window open so any errors can be seen (otherwise, it will close before you have a chance to see anything; this also goes for running it normally by double-clicking).
Otherwise, there really is no reason to have to download a standalone system JRE these days; I only have a JDK installed for mod development (which is still on Java 7 since MCP 1.6.4 compiles for Java 6 by default and I haven't had to use any newer language features, hence I have to use the Minecraft runtime to run programs that require Java 8, like AMIDST).
Also, Forge has an executable installer for Windows, which should be able to run like any normal program (IMO, no major mod developer should be relying on a Java-based installer these days; Java 8, the version recommended for Minecraft and required to run many mods due to Forge having issues with newer versions, is itself so old it may soon no longer be publicly available, and Oracle recommends providing your own runtime).