Question: I downloaded a file for a game that requires Java to run.  

When I downloaded the file it saved as a WinRAR file. So I right clicked the file and pressed open with Java Platform SE Binary (As that was the only Java add-on that came up). Then an Error Message came up which says:

> 
> Java Installation Not Completed.  
> 
>  Unable to install Java.  
> 
>  There are errors in the following switches:  
> 
>  ("C:\Users\MyName\Desktop\The file name for The Game(2).jar").  
> 
>  Check that the commands are valid and try again.
> 
> 
> 

But I have already Installed Java as well.

Has anyone got a fix they could recommend?

Answer: 
This can be run by using **Command prompt**

1. Open Command prompt (in windows: Windows+R -> type 'cmd' then enter)
2. Follow the path specified to your specific folder(upto where your jar file exists)  

for example: **D:\projects\folder1\innerFolder>**
3. now, java -jar filename.jar (then enter)

for example: **D:\projects\folder1\innerFolder>java -jar filename.jar**
4. Finally you can see your output

Note: Install java and also set path in environment variables
It's very simple and easy!
go to your downloads folder
Click on the part where it says downloads and press backspace.
It should show the download icon and an empty bar.
In that area, type: cmd
then press enter
Once command prompt is open, type
java - jar (NAME OF FILE).jar
Example: java -jar Optifine-1.16.5.jar
then press enter. You're done!