1

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?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Muxch
  • 21
  • 1
  • 1
  • 2
  • Are you trying to install the java JRE or do you have the JRE and are trying to run the game jar? – mep Oct 28 '17 at 23:33
  • Does this answer your question? [What causes "Unable to access jarfile" error?](https://stackoverflow.com/questions/11943948/what-causes-unable-to-access-jarfile-error) – Ramlal S Dec 31 '19 at 11:39

4 Answers4

3

One of your files is corrupted. Simply download Jarfix and run it.

The Breakdown has an easy and helpful website to using Jarfix. Simply follow the instructions and download it in the link below:

https://thebreakdown.xyz/jarfix-to-repair-jar-files-on-your-pc/

L0raxeo C
  • 323
  • 2
  • 16
2

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

Community
  • 1
  • 1
Ramlal S
  • 1,573
  • 1
  • 14
  • 34
  • This isn't very helpful. You are shoving vocabulary and instructions that probably don't make sense to him. You are tell him to see his output however he most likely don't know what to do from there. Google more errors? No. The solution is to run jarfix. – L0raxeo C Jan 14 '21 at 00:56
0

go try to open it via cmd by following:

press Win + "R" and type in "cmd" and press Enter

Then you type in the following:

java -jar C:\Users\MyName\Desktop\The file name for The Game(2).jar

if that dont work try to give more information (the full error, where do you get the error? As a Messagebox? Or as terminal output?)

Jonas
  • 198
  • 1
  • 14
0

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!